integ/config/puppet-modules/openstack/puppet-oslo-11.3.0/centos/patches/0002-add-psycopg2-drivername-to-postgresql-settings.patch
Scott Little bab9bb6b69 Internal restructuring of stx-integ
Create new directories:
   ceph
   config
   config-files
   filesystem
   kernel
   kernel/kernel-modules
   ldap
   logging
   strorage-drivers
   tools
   utilities
   virt

Retire directories:
   connectivity
   core
   devtools
   support
   extended

Delete two packages:
   tgt
   irqbalance

Relocated packages:
   base/
      dhcp
      initscripts
      libevent
      lighttpd
      linuxptp
      memcached
      net-snmp
      novnc
      ntp
      openssh
      pam
      procps
      sanlock
      shadow
      sudo
      systemd
      util-linux
      vim
      watchdog

   ceph/
      python-cephclient

   config/
      facter
      puppet-4.8.2
      puppet-modules

   filesystem/
      e2fsprogs
      nfs-utils
      nfscheck

   kernel/
      kernel-std
      kernel-rt

   kernel/kernel-modules/
      mlnx-ofa_kernel

   ldap/
      nss-pam-ldapd
      openldap

   logging/
      syslog-ng
      logrotate

   networking/
      lldpd
      iproute
      mellanox
      python-ryu
      mlx4-config

   python/
      python-2.7.5
      python-django
      python-gunicorn
      python-setuptools
      python-smartpm
      python-voluptuous

   security/
      shim-signed
      shim-unsigned
      tboot

   strorage-drivers/
      python-3parclient
      python-lefthandclient

   virt/
      cloud-init
      libvirt
      libvirt-python
      qemu

   tools/
      storage-topology
      vm-topology

   utilities/
      tis-extensions
      namespace-utils
      nova-utils
      update-motd

Change-Id: I37ade764d873c701b35eac5881eb40412ba64a86
Story: 2002801
Task: 22687
Signed-off-by: Scott Little <scott.little@windriver.com>
2018-08-01 10:06:31 -04:00

52 lines
2.0 KiB
Diff

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