puppet-oslo: update for stx 5.0 86/8186/1
authorJackie Huang <jackie.huang@windriver.com>
Tue, 8 Jun 2021 02:32:10 +0000 (10:32 +0800)
committerJackie Huang <jackie.huang@windriver.com>
Sun, 8 May 2022 04:47:11 +0000 (12:47 +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: I1ebd7cf04a7adc36abb7ee3b65f4542b31496184

meta-starlingx/meta-stx-cloud/recipes-support/puppet/files/puppet-oslo/0001-Remove-log_dir-from-conf-files.patch [deleted file]
meta-starlingx/meta-stx-cloud/recipes-support/puppet/files/puppet-oslo/0002-add-psycopg2-drivername-to-postgresql-settings.patch [deleted file]
meta-starlingx/meta-stx-cloud/recipes-support/puppet/puppet-oslo_git.bbappend

diff --git a/meta-starlingx/meta-stx-cloud/recipes-support/puppet/files/puppet-oslo/0001-Remove-log_dir-from-conf-files.patch b/meta-starlingx/meta-stx-cloud/recipes-support/puppet/files/puppet-oslo/0001-Remove-log_dir-from-conf-files.patch
deleted file mode 100644 (file)
index 3443b2e..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-From b8dee2da527c3d3010e2b5b4e49f87f430afa826 Mon Sep 17 00:00:00 2001
-From: Al Bailey <Al.Bailey@windriver.com>
-Date: Fri, 3 Nov 2017 17:48:38 -0500
-Subject: [PATCH] Remove log_dir from conf files
-
----
- manifests/log.pp | 6 ++----
- 1 file changed, 2 insertions(+), 4 deletions(-)
-
-diff --git a/manifests/log.pp b/manifests/log.pp
-index 8778d46..771a674 100644
---- a/manifests/log.pp
-+++ b/manifests/log.pp
-@@ -27,9 +27,7 @@
- #   Defaults to $::os_service_default
- #
- # [*log_dir*]
--#   (Optional) Directory where logs should be stored.
--#   If set to $::os_service_default, it will not log to any directory.
--#   Defaults to $::os_service_default
-+#   WRS: Remove log_dir to ensure services log via syslog
- #
- # [*watch_log_file*]
- #   (Optional) Uses logging handler designed to watch file system (boolean value).
-@@ -136,7 +134,7 @@ define oslo::log(
-     'DEFAULT/log_config_append'             => { value => $log_config_append },
-     'DEFAULT/log_date_format'               => { value => $log_date_format },
-     'DEFAULT/log_file'                      => { value => $log_file },
--    'DEFAULT/log_dir'                       => { value => $log_dir },
-+    'DEFAULT/log_dir'                       => { ensure => absent },
-     'DEFAULT/watch_log_file'                => { value => $watch_log_file },
-     'DEFAULT/use_syslog'                    => { value => $use_syslog },
-     'DEFAULT/syslog_log_facility'           => { value => $syslog_log_facility },
--- 
-1.8.3.1
-
diff --git a/meta-starlingx/meta-stx-cloud/recipes-support/puppet/files/puppet-oslo/0002-add-psycopg2-drivername-to-postgresql-settings.patch b/meta-starlingx/meta-stx-cloud/recipes-support/puppet/files/puppet-oslo/0002-add-psycopg2-drivername-to-postgresql-settings.patch
deleted file mode 100644 (file)
index 7340a06..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-From 1823423c329675a72ea5b3497c31f8c407dcdf27 Mon Sep 17 00:00:00 2001
-From: Al Bailey <Al.Bailey@windriver.com>
-Date: Thu, 14 Dec 2017 11:08:30 -0600
-Subject: [PATCH] add psycopg2 drivername to postgresql settings
-
----
- manifests/db.pp | 13 ++++++++-----
- 1 file changed, 8 insertions(+), 5 deletions(-)
-
-diff --git a/manifests/db.pp b/manifests/db.pp
-index 172c8ae..4b918bc 100644
---- a/manifests/db.pp
-+++ b/manifests/db.pp
-@@ -132,10 +132,13 @@ define oslo::db(
-   if !is_service_default($connection) {
--    validate_re($connection,
--      '^(sqlite|mysql(\+pymysql)?|postgresql|mongodb):\/\/(\S+:\S+@\S+\/\S+)?')
-+    if $connection !~ '^(sqlite|mysql(\+pymysql)?|postgresql(\+psycopg2)?|mongodb):\/\/(\S+:\S+@\S+\/\S+)?' {
-+      err{'invalid database connection parameter: $connection':}
-+    }
-+    # add psycopg2 drivername to postgresql if using driverless postgres setting
-+    $real_connection = regsubst($connection,'^postgresql:','postgresql+psycopg2:')
--    case $connection {
-+    case $real_connection {
-       /^mysql(\+pymysql)?:\/\//: {
-         require '::mysql::bindings'
-         require '::mysql::bindings::python'
-@@ -145,7 +148,7 @@ define oslo::db(
-           $backend_package = false
-         }
-       }
--      /^postgresql:\/\//: {
-+      /^postgresql(\+psycopg2)?:\/\//: {
-         $backend_package = false
-         require '::postgresql::lib::python'
-       }
-@@ -178,7 +181,7 @@ to connect to the database.")
-   $database_options = {
-     'database/sqlite_synchronous'    => { value => $sqlite_synchronous },
-     'database/backend'               => { value => $backend },
--    'database/connection'            => { value => $connection, secret => true },
-+    'database/connection'            => { value => $real_connection, secret => true },
-     'database/slave_connection'      => { value => $slave_connection, secret => true },
-     'database/mysql_sql_mode'        => { value => $mysql_sql_mode },
-     'database/idle_timeout'          => { value => $idle_timeout },
--- 
-1.8.3.1
-
index db9c263..6d96c15 100644 (file)
@@ -1,8 +1,11 @@
+inherit stx-metadata
 
-FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
-SRC_URI += " \
-       file://puppet-oslo/0001-Remove-log_dir-from-conf-files.patch \
-       file://puppet-oslo/0002-add-psycopg2-drivername-to-postgresql-settings.patch \
+STX_REPO = "integ"
+STX_SUBPATH = "config/puppet-modules/openstack/${BP}/centos/patches"
+
+SRC_URI_STX += " \
+       file://0001-Remove-log_dir-from-conf-files.patch \
+       file://0002-add-psycopg2-drivername-to-postgresql-settings.patch \
        "
 
 do_install_append () {