e51a4a5bbe
This change can fix the issue during package upgrade that causes config_controller failed at step 6. Root cause is that package update introduced a warning output in frontend.pp file which will cause puppet-manifest-apply failure as it do not allow any warning existed in puppet log. Story: 2003389 Task: 24504 Depends-On: https://review.openstack.org/#/c/600359/ Change-Id: Iabfa73e80859feeccbc1e6c81032169f94812013 Signed-off-by: zhipengl <zhipengs.liu@intel.com>
124 lines
4.5 KiB
Diff
124 lines
4.5 KiB
Diff
From 50ef964cc4f918982d2889610c5f6e7506741518 Mon Sep 17 00:00:00 2001
|
|
From: Kam Nasim <kam.nasim@windriver.com>
|
|
Date: Fri, 26 May 2017 17:04:32 -0400
|
|
Subject: [PATCH] disable configuration validation during haproxy manifest
|
|
apply since some files/options referenced in the configuration (such as for
|
|
TPM) may still be in flight while the haproxy manifest applies. This
|
|
validation option is a bit of an overkill anyways since it doesn't cause
|
|
Packstack to fail the manifest application, and is a soft error log but with
|
|
the added disadvantage of not applying any haproxy configuration (even the
|
|
sane bits) on a validation failure
|
|
|
|
---
|
|
manifests/config.pp | 8 --------
|
|
manifests/init.pp | 7 -------
|
|
manifests/instance.pp | 7 -------
|
|
manifests/params.pp | 1 -
|
|
4 files changed, 23 deletions(-)
|
|
|
|
diff --git a/manifests/config.pp b/manifests/config.pp
|
|
index 4007bb8..b8d4ef4 100644
|
|
--- a/manifests/config.pp
|
|
+++ b/manifests/config.pp
|
|
@@ -8,7 +8,6 @@ define haproxy::config (
|
|
$config_dir = undef, # A default is required for Puppet 2.7 compatibility. When 2.7 is no longer supported, this parameter default should be removed.
|
|
$custom_fragment = undef, # A default is required for Puppet 2.7 compatibility. When 2.7 is no longer supported, this parameter default should be removed.
|
|
$merge_options = $haproxy::merge_options,
|
|
- $config_validate_cmd = $haproxy::config_validate_cmd
|
|
) {
|
|
|
|
if $caller_module_name != $module_name {
|
|
@@ -50,13 +49,6 @@ define haproxy::config (
|
|
mode => '0640',
|
|
}
|
|
|
|
- # validate_cmd introduced in Puppet 3.5
|
|
- if ((!defined('$::puppetversion') or (versioncmp($::puppetversion, '3.5') >= 0)) and (!defined('$::serverversion') or versioncmp($::serverversion, '3.5') >= 0)) {
|
|
- Concat[$_config_file] {
|
|
- validate_cmd => $config_validate_cmd,
|
|
- }
|
|
- }
|
|
-
|
|
# Simple Header
|
|
concat::fragment { "${instance_name}-00-header":
|
|
target => $_config_file,
|
|
diff --git a/manifests/init.pp b/manifests/init.pp
|
|
index 54a1640..d84755e 100644
|
|
--- a/manifests/init.pp
|
|
+++ b/manifests/init.pp
|
|
@@ -72,11 +72,6 @@
|
|
# Optional. Path to the haproxy config file.
|
|
# Default depends on platform.
|
|
#
|
|
-# [*config_validate_cmd*]
|
|
-# Optional. Command used by concat validate_cmd to validate new
|
|
-# config file concat is a valid haproxy config.
|
|
-# Default /usr/sbin/haproxy -f % -c
|
|
-#
|
|
# === Examples
|
|
#
|
|
# class { 'haproxy':
|
|
@@ -122,7 +117,6 @@ class haproxy (
|
|
$config_dir = $haproxy::params::config_dir,
|
|
$config_file = $haproxy::params::config_file,
|
|
$manage_config_dir = $haproxy::params::manage_config_dir,
|
|
- $config_validate_cmd = $haproxy::params::config_validate_cmd,
|
|
|
|
# Deprecated
|
|
$manage_service = undef,
|
|
@@ -183,7 +177,6 @@ class haproxy (
|
|
merge_options => $merge_options,
|
|
service_options => $service_options,
|
|
sysconfig_options => $sysconfig_options,
|
|
- config_validate_cmd => $config_validate_cmd,
|
|
}
|
|
|
|
}
|
|
diff --git a/manifests/instance.pp b/manifests/instance.pp
|
|
index 3dffdae..7f37751 100644
|
|
--- a/manifests/instance.pp
|
|
+++ b/manifests/instance.pp
|
|
@@ -63,11 +63,6 @@
|
|
# The parent directory will be created automatically.
|
|
# Defaults to undef.
|
|
#
|
|
-# [*config_validate_cmd*]
|
|
-# Command used by concat validate_cmd to validate new
|
|
-# config file concat is a valid haproxy config.
|
|
-# Default /usr/sbin/haproxy -f % -c
|
|
-#
|
|
# === Examples
|
|
#
|
|
# A single instance of haproxy with all defaults
|
|
@@ -153,7 +148,6 @@ define haproxy::instance (
|
|
$merge_options = $haproxy::params::merge_options,
|
|
$service_options = $haproxy::params::service_options,
|
|
$sysconfig_options = $haproxy::params::sysconfig_options,
|
|
- $config_validate_cmd = $haproxy::params::config_validate_cmd,
|
|
) {
|
|
|
|
if $service_ensure != true and $service_ensure != false {
|
|
@@ -208,7 +202,6 @@ define haproxy::instance (
|
|
custom_fragment => $custom_fragment,
|
|
merge_options => $merge_options,
|
|
package_ensure => $package_ensure,
|
|
- config_validate_cmd => $config_validate_cmd,
|
|
}
|
|
haproxy::install { $title:
|
|
package_name => $package_name,
|
|
diff --git a/manifests/params.pp b/manifests/params.pp
|
|
index d7b9fa9..21e6bb0 100644
|
|
--- a/manifests/params.pp
|
|
+++ b/manifests/params.pp
|
|
@@ -10,7 +10,6 @@ class haproxy::params {
|
|
|
|
$service_options = "ENABLED=1\n" # Only used by Debian.
|
|
$sysconfig_options = 'OPTIONS=""' #Only used by Redhat/CentOS etc
|
|
- $config_validate_cmd = '/usr/sbin/haproxy -f % -c'
|
|
|
|
case $::osfamily {
|
|
'Archlinux', 'Debian', 'Redhat', 'Gentoo', 'Suse' : {
|
|
--
|
|
2.7.4
|
|
|