puppetlabs-haproxy: update for stx 5.0 78/8178/1
authorJackie Huang <jackie.huang@windriver.com>
Tue, 8 Jun 2021 02:32:10 +0000 (10:32 +0800)
committerJackie Huang <jackie.huang@windriver.com>
Fri, 6 May 2022 08:51:09 +0000 (16:51 +0800)
* inherit stx-metadata to help apply patches
  from stx 'integ' repo

* remove the local copy of stx patches

Issue-ID: INF-215

Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Change-Id: Idef3c83cb8a0b4d3589aa59d4ef84f4e79541f9f

meta-starlingx/meta-stx-cloud/recipes-support/puppet/files/puppetlabs-haproxy/0001-Roll-up-TIS-patches.patch [deleted file]
meta-starlingx/meta-stx-cloud/recipes-support/puppet/files/puppetlabs-haproxy/0002-disable-config-validation-prechecks.patch [deleted file]
meta-starlingx/meta-stx-cloud/recipes-support/puppet/files/puppetlabs-haproxy/0003-Fix-global_options-log-default-value.patch [deleted file]
meta-starlingx/meta-stx-cloud/recipes-support/puppet/files/puppetlabs-haproxy/0004-Stop-invalid-warning-message [deleted file]
meta-starlingx/meta-stx-cloud/recipes-support/puppet/puppetlabs-haproxy_git.bbappend

diff --git a/meta-starlingx/meta-stx-cloud/recipes-support/puppet/files/puppetlabs-haproxy/0001-Roll-up-TIS-patches.patch b/meta-starlingx/meta-stx-cloud/recipes-support/puppet/files/puppetlabs-haproxy/0001-Roll-up-TIS-patches.patch
deleted file mode 100644 (file)
index 15b3575..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-From 4485b6cbf5a8bf1d3830b0406685aba3ece4e413 Mon Sep 17 00:00:00 2001
-From: Don Penney <don.penney@windriver.com>
-Date: Wed, 11 Jan 2017 13:05:12 -0500
-Subject: [PATCH] Roll up TIS patches
-
----
- 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 51c2741..4007bb8 100644
---- a/manifests/config.pp
-+++ b/manifests/config.pp
-@@ -75,8 +75,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 f1109d0..54a1640 100644
---- a/manifests/init.pp
-+++ b/manifests/init.pp
-@@ -110,8 +110,8 @@
- class haproxy (
-   $package_ensure      = 'present',
-   $package_name        = $haproxy::params::package_name,
--  $service_ensure      = 'running',
--  $service_manage      = true,
-+  $service_ensure    = false,
-+  $service_manage    = false,
-   $service_options     = $haproxy::params::service_options,
-   $sysconfig_options   = $haproxy::params::sysconfig_options,
-   $global_options      = $haproxy::params::global_options,
--- 
-2.7.4
-
diff --git a/meta-starlingx/meta-stx-cloud/recipes-support/puppet/files/puppetlabs-haproxy/0002-disable-config-validation-prechecks.patch b/meta-starlingx/meta-stx-cloud/recipes-support/puppet/files/puppetlabs-haproxy/0002-disable-config-validation-prechecks.patch
deleted file mode 100644 (file)
index 43c3067..0000000
+++ /dev/null
@@ -1,123 +0,0 @@
-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
-
diff --git a/meta-starlingx/meta-stx-cloud/recipes-support/puppet/files/puppetlabs-haproxy/0003-Fix-global_options-log-default-value.patch b/meta-starlingx/meta-stx-cloud/recipes-support/puppet/files/puppetlabs-haproxy/0003-Fix-global_options-log-default-value.patch
deleted file mode 100644 (file)
index 79d1e82..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-From 16163f14c8f9b1b81b6e394c31c72030938435c7 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] 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 21e6bb0..b29e427 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.7.4
-
diff --git a/meta-starlingx/meta-stx-cloud/recipes-support/puppet/files/puppetlabs-haproxy/0004-Stop-invalid-warning-message b/meta-starlingx/meta-stx-cloud/recipes-support/puppet/files/puppetlabs-haproxy/0004-Stop-invalid-warning-message
deleted file mode 100644 (file)
index 44c9b52..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-From 7e1cff1503d9980e6fa346ec0e9cb93dc69774bf Mon Sep 17 00:00:00 2001
-From: zhipengl <zhipengs.liu@intel.com>
-Date: Fri, 7 Sep 2018 19:24:01 +0800
-Subject: [PATCH] Stop-invalid-warning-message.patch
-
-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 1623115..709a08c 100644
---- a/manifests/frontend.pp
-+++ b/manifests/frontend.pp
-@@ -102,7 +102,7 @@ define haproxy::frontend (
-   $defaults_use_backend    = true,
-   $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.7.4
-
index 7a5e4a0..f22ae19 100644 (file)
@@ -1,10 +1,13 @@
+inherit stx-metadata
 
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-SRC_URI += " \
-       file://puppetlabs-haproxy/0001-Roll-up-TIS-patches.patch \
-       file://puppetlabs-haproxy/0002-disable-config-validation-prechecks.patch \
-       file://puppetlabs-haproxy/0003-Fix-global_options-log-default-value.patch \
-       file://puppetlabs-haproxy/0004-Stop-invalid-warning-message \
+STX_REPO = "integ"
+STX_SUBPATH = "config/puppet-modules/puppet-haproxy-${PV}/centos/patches"
+
+SRC_URI_STX += " \
+       file://0001-Roll-up-TIS-patches.patch \
+       file://0002-disable-config-validation-prechecks.patch \
+       file://0003-Fix-global_options-log-default-value.patch \
+       file://0004-Stop-invalid-warning-message \
        "
 
 inherit openssl10