Merge "Add debian package for puppetlabs-haproxy-2.1.0"
This commit is contained in:
commit
2e16e588d9
@ -0,0 +1,10 @@
|
|||||||
|
---
|
||||||
|
debname: puppet-module-puppetlabs-haproxy
|
||||||
|
debver: 2.1.0-3
|
||||||
|
dl_path:
|
||||||
|
name: puppet-module-puppetlabs-haproxy-2.1.0-3.tar.gz
|
||||||
|
url: https://salsa.debian.org/openstack-team/puppet/puppet-module-puppetlabs-haproxy/-/archive/debian/2.1.0-3/puppet-module-puppetlabs-haproxy-debian-2.1.0-3.tar.gz
|
||||||
|
md5sum: 0e523b59292206194b3bacc28bd483e2
|
||||||
|
revision:
|
||||||
|
dist: $STX_DIST
|
||||||
|
PKG_GITREVCOUNT: true
|
@ -0,0 +1,46 @@
|
|||||||
|
From 40837e004d4c92212a9c0dd9974b1cc789dba80f Mon Sep 17 00:00:00 2001
|
||||||
|
From: Dan Voiculeasa <dan.voiculeasa@windriver.com>
|
||||||
|
Date: Wed, 15 Sep 2021 13:39:32 +0300
|
||||||
|
Subject: [PATCH 1/4] Adapt first set of legacy patches
|
||||||
|
|
||||||
|
Adapt 0001-Roll-up-TIS-patches.patch from CentOS.
|
||||||
|
|
||||||
|
Signed-off-by: Dan Voiculeasa <dan.voiculeasa@windriver.com>
|
||||||
|
---
|
||||||
|
manifests/config.pp | 4 ++--
|
||||||
|
manifests/init.pp | 4 ++--
|
||||||
|
2 files changed, 4 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/manifests/config.pp b/manifests/config.pp
|
||||||
|
index ac59623..440cfb5 100644
|
||||||
|
--- a/manifests/config.pp
|
||||||
|
+++ b/manifests/config.pp
|
||||||
|
@@ -79,8 +79,8 @@ define haproxy::config (
|
||||||
|
if $_global_options['chroot'] {
|
||||||
|
file { $_global_options['chroot']:
|
||||||
|
ensure => directory,
|
||||||
|
- owner => $_global_options['user'],
|
||||||
|
- group => $_global_options['group'],
|
||||||
|
+ owner => 'root',
|
||||||
|
+ group => 'root',
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
diff --git a/manifests/init.pp b/manifests/init.pp
|
||||||
|
index 330a0ef..49c5a2e 100644
|
||||||
|
--- a/manifests/init.pp
|
||||||
|
+++ b/manifests/init.pp
|
||||||
|
@@ -111,8 +111,8 @@
|
||||||
|
class haproxy (
|
||||||
|
String[1] $package_ensure = 'present',
|
||||||
|
String $package_name = $haproxy::params::package_name,
|
||||||
|
- Variant[Enum['running', 'stopped'], Boolean] $service_ensure = 'running',
|
||||||
|
- Boolean $service_manage = true,
|
||||||
|
+ Variant[Enum['running', 'stopped'], Boolean] $service_ensure = false,
|
||||||
|
+ Boolean $service_manage = false,
|
||||||
|
String $service_options = $haproxy::params::service_options,
|
||||||
|
$sysconfig_options = $haproxy::params::sysconfig_options,
|
||||||
|
Hash $global_options = $haproxy::params::global_options,
|
||||||
|
--
|
||||||
|
2.30.0
|
||||||
|
|
@ -0,0 +1,129 @@
|
|||||||
|
From 5133594ba82a52364afe324781f829975386e2a9 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Dan Voiculeasa <dan.voiculeasa@windriver.com>
|
||||||
|
Date: Wed, 15 Sep 2021 14:04:34 +0300
|
||||||
|
Subject: [PATCH 2/4] Disable configuration validation during manifest apply
|
||||||
|
|
||||||
|
Adapt 0002-disable-config-validation-prechecks.patch from CentOS.
|
||||||
|
|
||||||
|
Signed-off-by: Dan Voiculeasa <dan.voiculeasa@windriver.com>
|
||||||
|
---
|
||||||
|
manifests/config.pp | 9 ---------
|
||||||
|
manifests/init.pp | 7 -------
|
||||||
|
manifests/instance.pp | 7 -------
|
||||||
|
manifests/params.pp | 2 --
|
||||||
|
4 files changed, 25 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/manifests/config.pp b/manifests/config.pp
|
||||||
|
index 440cfb5..8ace5a9 100644
|
||||||
|
--- a/manifests/config.pp
|
||||||
|
+++ b/manifests/config.pp
|
||||||
|
@@ -10,7 +10,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
|
||||||
|
# lint:endignore
|
||||||
|
) {
|
||||||
|
|
||||||
|
@@ -53,14 +52,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 49c5a2e..70b7c2f 100644
|
||||||
|
--- a/manifests/init.pp
|
||||||
|
+++ b/manifests/init.pp
|
||||||
|
@@ -73,11 +73,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':
|
||||||
|
@@ -123,7 +118,6 @@ class haproxy (
|
||||||
|
Stdlib::Absolutepath $config_dir = $haproxy::params::config_dir,
|
||||||
|
Optional[Stdlib::Absolutepath] $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,
|
||||||
|
@@ -172,7 +166,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 b23ba47..ebb8470 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
|
||||||
|
@@ -150,7 +145,6 @@ define haproxy::instance (
|
||||||
|
$custom_fragment = undef,
|
||||||
|
$config_dir = undef,
|
||||||
|
Optional[Stdlib::Absolutepath] $config_file = undef,
|
||||||
|
- $config_validate_cmd = $haproxy::params::config_validate_cmd,
|
||||||
|
$merge_options = $haproxy::params::merge_options,
|
||||||
|
$service_options = $haproxy::params::service_options,
|
||||||
|
$sysconfig_options = $haproxy::params::sysconfig_options,
|
||||||
|
@@ -197,7 +191,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 de00f91..6c094f6 100644
|
||||||
|
--- a/manifests/params.pp
|
||||||
|
+++ b/manifests/params.pp
|
||||||
|
@@ -39,7 +39,6 @@ class haproxy::params {
|
||||||
|
],
|
||||||
|
'maxconn' => '8000',
|
||||||
|
}
|
||||||
|
- $config_validate_cmd = '/usr/sbin/haproxy -f % -c'
|
||||||
|
# Single instance:
|
||||||
|
$config_dir = '/etc/haproxy'
|
||||||
|
$config_file = '/etc/haproxy/haproxy.cfg'
|
||||||
|
@@ -74,7 +73,6 @@ class haproxy::params {
|
||||||
|
'clitimeout' => '50000',
|
||||||
|
'srvtimeout' => '50000',
|
||||||
|
}
|
||||||
|
- $config_validate_cmd = '/usr/local/sbin/haproxy -f % -c'
|
||||||
|
# Single instance:
|
||||||
|
$config_dir = '/usr/local/etc'
|
||||||
|
$config_file = '/usr/local/etc/haproxy.conf'
|
||||||
|
--
|
||||||
|
2.30.0
|
||||||
|
|
@ -0,0 +1,26 @@
|
|||||||
|
From b06ab65ba88a9f87f68de05bb21ee95fa78f39ef Mon Sep 17 00:00:00 2001
|
||||||
|
From: Don Penney <don.penney@windriver.com>
|
||||||
|
Date: Tue, 4 Sep 2018 20:01:53 +0800
|
||||||
|
Subject: [PATCH 3/4] Fix global_options log default value
|
||||||
|
|
||||||
|
Signed-off-by: zhipengl <zhipengs.liu@intel.com>
|
||||||
|
---
|
||||||
|
manifests/params.pp | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/manifests/params.pp b/manifests/params.pp
|
||||||
|
index 6c094f6..876d068 100644
|
||||||
|
--- a/manifests/params.pp
|
||||||
|
+++ b/manifests/params.pp
|
||||||
|
@@ -15,7 +15,7 @@ class haproxy::params {
|
||||||
|
'Archlinux', 'Debian', 'Redhat', 'Gentoo', 'Suse' : {
|
||||||
|
$package_name = 'haproxy'
|
||||||
|
$global_options = {
|
||||||
|
- 'log' => "${::ipaddress} local0",
|
||||||
|
+ 'log' => 'global',
|
||||||
|
'chroot' => '/var/lib/haproxy',
|
||||||
|
'pidfile' => '/var/run/haproxy.pid',
|
||||||
|
'maxconn' => '4000',
|
||||||
|
--
|
||||||
|
2.30.0
|
||||||
|
|
@ -0,0 +1,31 @@
|
|||||||
|
From 8cc5a40c7a1d029b4a82b8e3880ae0e56590ca03 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Dan Voiculeasa <dan.voiculeasa@windriver.com>
|
||||||
|
Date: Wed, 15 Sep 2021 14:10:20 +0300
|
||||||
|
Subject: [PATCH 4/4] Stop invalid warning message
|
||||||
|
|
||||||
|
It can fix config_controller failure at step 6.
|
||||||
|
|
||||||
|
The upstream fix is at below link
|
||||||
|
https://github.com/puppetlabs/puppetlabs-haproxy/commit/20db4474c5938c21ac441f0092254c78b5978cc4
|
||||||
|
|
||||||
|
Signed-off-by: zhipengl <zhipengs.liu@intel.com>
|
||||||
|
---
|
||||||
|
manifests/frontend.pp | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/manifests/frontend.pp b/manifests/frontend.pp
|
||||||
|
index afd8c7b..24db454 100644
|
||||||
|
--- a/manifests/frontend.pp
|
||||||
|
+++ b/manifests/frontend.pp
|
||||||
|
@@ -102,7 +102,7 @@ define haproxy::frontend (
|
||||||
|
$defaults_use_backend = true,
|
||||||
|
Optional[Stdlib::Absolutepath] $config_file = undef,
|
||||||
|
# Deprecated
|
||||||
|
- $bind_options = undef,
|
||||||
|
+ $bind_options = '',
|
||||||
|
) {
|
||||||
|
if $ports and $bind {
|
||||||
|
fail('The use of $ports and $bind is mutually exclusive, please choose either one')
|
||||||
|
--
|
||||||
|
2.30.0
|
||||||
|
|
@ -0,0 +1,4 @@
|
|||||||
|
0001-Adapt-first-set-of-legacy-patches.patch
|
||||||
|
0002-Disable-configuration-validation-during-manifest-app.patch
|
||||||
|
0003-Fix-global_options-log-default-value.patch
|
||||||
|
0004-Stop-invalid-warning-message.patch
|
Loading…
Reference in New Issue
Block a user