From dab07c3077c19c3ae015b72e5de4da52f1269710 Mon Sep 17 00:00:00 2001 From: Dan Voiculeasa Date: Mon, 20 Sep 2021 13:12:57 +0300 Subject: [PATCH] Add debian package for puppet-module-oslo-17.4.0 Aligned with Debian Bullseye version puppet-module-oslo-17.4.0-2. Did build puppet-oslo-17.4.0 + starlingx patches (adapted from CentOS7). Adapted all patches. Did build an iso. Story: 2009101 Task: 43367 Signed-off-by: Dan Voiculeasa Change-Id: I446f24e5c53c9f91a57b6c04a4e96f8726928aa1 --- .../puppet-oslo-17.4.0/debian/meta_data.yaml | 10 +++++ .../0001-Remove-log_dir-from-conf-files.patch | 39 +++++++++++++++++ ...g2-drivername-to-postgresql-settings.patch | 42 +++++++++++++++++++ .../puppet-oslo-17.4.0/debian/patches/series | 2 + 4 files changed, 93 insertions(+) create mode 100644 config/puppet-modules/openstack/puppet-oslo-17.4.0/debian/meta_data.yaml create mode 100644 config/puppet-modules/openstack/puppet-oslo-17.4.0/debian/patches/0001-Remove-log_dir-from-conf-files.patch create mode 100644 config/puppet-modules/openstack/puppet-oslo-17.4.0/debian/patches/0002-Add-psycopg2-drivername-to-postgresql-settings.patch create mode 100644 config/puppet-modules/openstack/puppet-oslo-17.4.0/debian/patches/series diff --git a/config/puppet-modules/openstack/puppet-oslo-17.4.0/debian/meta_data.yaml b/config/puppet-modules/openstack/puppet-oslo-17.4.0/debian/meta_data.yaml new file mode 100644 index 000000000..dc23debaf --- /dev/null +++ b/config/puppet-modules/openstack/puppet-oslo-17.4.0/debian/meta_data.yaml @@ -0,0 +1,10 @@ +--- +debname: puppet-module-oslo +debver: 17.4.0-2 +dl_path: + name: puppet-module-oslo-17.4.0-2.tar.gz + url: https://salsa.debian.org/openstack-team/puppet/puppet-module-oslo/-/archive/debian/17.4.0-2/puppet-module-oslo-debian-17.4.0-2.tar.gz + md5sum: 1dc3e1b22756f9ad236458ec0e48cbd5 +revision: + dist: $STX_DIST + PKG_GITREVCOUNT: true diff --git a/config/puppet-modules/openstack/puppet-oslo-17.4.0/debian/patches/0001-Remove-log_dir-from-conf-files.patch b/config/puppet-modules/openstack/puppet-oslo-17.4.0/debian/patches/0001-Remove-log_dir-from-conf-files.patch new file mode 100644 index 000000000..65bd2d383 --- /dev/null +++ b/config/puppet-modules/openstack/puppet-oslo-17.4.0/debian/patches/0001-Remove-log_dir-from-conf-files.patch @@ -0,0 +1,39 @@ +From f692f32676c5f4cf22abc97598e049578e1e7bf7 Mon Sep 17 00:00:00 2001 +From: Dan Voiculeasa +Date: Mon, 20 Sep 2021 13:02:19 +0300 +Subject: [PATCH 1/2] Remove log_dir from conf files + +Adapt 0001-Remove-log_dir-from-conf-files.patch from CentOS. + +Signed-off-by: Dan Voiculeasa +--- + manifests/log.pp | 6 ++---- + 1 file changed, 2 insertions(+), 4 deletions(-) + +diff --git a/manifests/log.pp b/manifests/log.pp +index 96ce363..bb6876f 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 ++# STX: Remove log_dir to ensure services log via syslog + # + # [*watch_log_file*] + # (Optional) Uses logging handler designed to watch file system (boolean value). +@@ -154,7 +152,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/use_journal' => { value => $use_journal }, +-- +2.30.0 + diff --git a/config/puppet-modules/openstack/puppet-oslo-17.4.0/debian/patches/0002-Add-psycopg2-drivername-to-postgresql-settings.patch b/config/puppet-modules/openstack/puppet-oslo-17.4.0/debian/patches/0002-Add-psycopg2-drivername-to-postgresql-settings.patch new file mode 100644 index 000000000..6a1c412c7 --- /dev/null +++ b/config/puppet-modules/openstack/puppet-oslo-17.4.0/debian/patches/0002-Add-psycopg2-drivername-to-postgresql-settings.patch @@ -0,0 +1,42 @@ +From fd058e19897326e31bb0c32332adc36b14d5fd22 Mon Sep 17 00:00:00 2001 +From: Dan Voiculeasa +Date: Mon, 20 Sep 2021 13:11:39 +0300 +Subject: [PATCH 2/2] Add psycopg2 drivername to postgresql settings + +Adapt 0002-add-psycopg2-drivername-to-postgresql-settings.patch from +CentOS. + +Signed-off-by: Dan Voiculeasa +--- + manifests/db.pp | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/manifests/db.pp b/manifests/db.pp +index 3fcb191..697c1d1 100644 +--- a/manifests/db.pp ++++ b/manifests/db.pp +@@ -158,8 +158,11 @@ define oslo::db( + validate_legacy(Oslo::Dbconn, 'validate_re', $connection, + ['^(sqlite|mysql(\+pymysql)?|postgresql(\+psycopg2)?|mongodb):\/\/(\S+:\S+@\S+\/\S+)?']) + ++ # add psycopg2 drivername to postgresql if using driverless postgres setting ++ $real_connection = regsubst($connection,'^postgresql:','postgresql+psycopg2:') ++ + if $manage_backend_package { +- case $connection { ++ case $real_connection { + /^mysql(\+pymysql)?:\/\//: { + require 'mysql::bindings' + require 'mysql::bindings::python' +@@ -205,7 +208,7 @@ define oslo::db( + $database_options = { + "${config_group}/sqlite_synchronous" => { value => $sqlite_synchronous }, + "${config_group}/backend" => { value => $backend }, +- "${config_group}/connection" => { value => $connection, secret => true }, ++ "${config_group}/connection" => { value => $real_connection, secret => true }, + "${config_group}/slave_connection" => { value => $slave_connection, secret => true }, + "${config_group}/mysql_sql_mode" => { value => $mysql_sql_mode }, + "${config_group}/connection_recycle_time" => { value => $connection_recycle_time }, +-- +2.30.0 + diff --git a/config/puppet-modules/openstack/puppet-oslo-17.4.0/debian/patches/series b/config/puppet-modules/openstack/puppet-oslo-17.4.0/debian/patches/series new file mode 100644 index 000000000..132d21922 --- /dev/null +++ b/config/puppet-modules/openstack/puppet-oslo-17.4.0/debian/patches/series @@ -0,0 +1,2 @@ +0001-Remove-log_dir-from-conf-files.patch +0002-Add-psycopg2-drivername-to-postgresql-settings.patch