[openstack-puppet-modules/f22] Updated patches from f22-patches

Ivan Chavero ichavero at fedoraproject.org
Wed Mar 18 21:55:38 UTC 2015


commit df6380aa2f234236c19f13ed656b1a09fcaff065
Author: Ivan Chavero <ichavero at redhat.com>
Date:   Wed Mar 18 14:47:45 2015 -0700

    Updated patches from f22-patches

 0019-Restore-sql_connection-option.patch | 73 ++++++++++++++++++++++++++++++++
 openstack-puppet-modules.spec            |  2 +
 2 files changed, 75 insertions(+)
---
diff --git a/0019-Restore-sql_connection-option.patch b/0019-Restore-sql_connection-option.patch
new file mode 100644
index 0000000..577ced5
--- /dev/null
+++ b/0019-Restore-sql_connection-option.patch
@@ -0,0 +1,73 @@
+From 9f56ae2313dd0a4e4957cf999d41cad3a48409a9 Mon Sep 17 00:00:00 2001
+From: Ivan Chavero <ichavero at redhat.com>
+Date: Tue, 17 Mar 2015 14:28:42 -0700
+Subject: [PATCH] Restore sql_connection option
+
+This option was deprecated upstream but it's still needed
+
+Fixes: rhbz#1202555
+---
+ nova/manifests/init.pp | 40 ++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 40 insertions(+)
+
+diff --git a/nova/manifests/init.pp b/nova/manifests/init.pp
+index 40c8c79..884db74 100644
+--- a/nova/manifests/init.pp
++++ b/nova/manifests/init.pp
+@@ -265,9 +265,13 @@
+ #   and you have multiple endpoints, you will get AmbiguousEndpoint
+ #   exceptions in the nova API service.
+ #   Defaults to undef
++# [*sql_connection*]
++#   (optional) Deprecated. Use database_connection instead.
++#   Defaults to false
+ class nova(
+   $ensure_package           = 'present',
+   $database_connection      = false,
++  $sql_connection           = false,
+   $database_idle_timeout    = 3600,
+   $rpc_backend              = 'nova.openstack.common.rpc.impl_kombu',
+   $image_service            = 'nova.image.glance.GlanceImageService',
+@@ -501,6 +505,42 @@ class nova(
+     refreshonly => true,
+   }
+ 
++
++  if $sql_connection {
++    warning('The sql_connection parameter is deprecated, use database_connection instead.')
++    $database_connection_real = $sql_connection
++  } else {
++    $database_connection_real = $database_connection
++  }
++
++  if $sql_idle_timeout {
++    warning('The sql_idle_timeout parameter is deprecated, use database_idle_timeout instead.')
++    $database_idle_timeout_real = $sql_idle_timeout
++  } else {
++    $database_idle_timeout_real = $database_idle_timeout
++  }
++
++  # both the database_connection and rabbit_host are things
++  # that may need to be collected from a remote host
++  if $database_connection_real {
++    if($database_connection_real =~ /mysql:\/\/\S+:\S+@\S+\/\S+/) {
++      require 'mysql::bindings'
++      require 'mysql::bindings::python'
++    } elsif($database_connection_real =~ /postgresql:\/\/\S+:\S+@\S+\/\S+/) {
++
++    } elsif($database_connection_real =~ /sqlite:\/\//) {
++
++    } else {
++      fail("Invalid db connection ${database_connection_real}")
++    }
++    nova_config {
++      'database/connection':   value => $database_connection_real, secret => true;
++      'database/idle_timeout': value => $database_idle_timeout_real;
++    }
++  }
++
++
++
+   nova_config { 'DEFAULT/image_service': value => $image_service }
+ 
+   if $image_service == 'nova.image.glance.GlanceImageService' {
diff --git a/openstack-puppet-modules.spec b/openstack-puppet-modules.spec
index 442504e..5b963a6 100644
--- a/openstack-puppet-modules.spec
+++ b/openstack-puppet-modules.spec
@@ -27,6 +27,7 @@ Patch0015: 0015-Adding-portdb-and-fastpath_flood-to-n1kv.conf.patch
 Patch0016: 0016-Changing-the-default-value-of-fastpath_flood-to-enab.patch
 Patch0017: 0017-Make-cisco-plugin-symlink-coherent.patch
 Patch0018: 0018-Add-serialproxy-configuration.patch
+Patch0019: 0019-Restore-sql_connection-option.patch
 
 BuildArch:      noarch
 Requires:       rubygem-json
@@ -57,6 +58,7 @@ OpenStack via installers using Puppet configuration tool.
 %patch0016 -p1
 %patch0017 -p1
 %patch0018 -p1
+%patch0019 -p1
 
 find %{_builddir}/%{name}-%{version}/ -type f -name ".*" -exec rm {} +
 find %{_builddir}/%{name}-%{version}/ -size 0 -exec rm {} +


More information about the scm-commits mailing list