puppet-cinder: Fix cinder call nova over public ip

Using public ip leads to SSL certificate failures on HTTPS enabled
deployments.

Cinder stopped using two cinder.conf options, nova_catalog_info and
nova_catalog_admin_info.
The two options are replaced by [nova]/interface. Upstream puppet is
still using the two options although cinder seems to have stopped.

Change-Id: I23e591005e35ffab63a72f4d3f82809684233e38
Signed-off-by: Jack Ding <jack.ding@windriver.com>
This commit is contained in:
Ovidiu Poncea 2018-03-22 05:41:58 -04:00 committed by Jack Ding
parent c15b332775
commit e3f356e98e
4 changed files with 121 additions and 1 deletions

View File

@ -1 +1 @@
TIS_PATCH_VER=5
TIS_PATCH_VER=6

View File

@ -0,0 +1,33 @@
From 743a3c2650c541543b5741c0315bce6ef3b59491 Mon Sep 17 00:00:00 2001
From: Ovidiu Poncea <ovidiu.poncea@windriver.com>
Date: Thu, 22 Mar 2018 05:18:06 -0400
Subject: [PATCH] CGTS-9191: Fix cinder calling nova over public ip
Using public ip leads to SSL certificate failures on HTTPS enabled deployments.
---
SPECS/puppet-cinder.spec | 2 ++
1 file changed, 2 insertions(+)
diff --git a/SPECS/puppet-cinder.spec b/SPECS/puppet-cinder.spec
index bf848da..9d03ef3 100644
--- a/SPECS/puppet-cinder.spec
+++ b/SPECS/puppet-cinder.spec
@@ -10,6 +10,7 @@ URL: https://launchpad.net/puppet-cinder
Source0: https://tarballs.openstack.org/%{name}/%{name}-%{upstream_version}.tar.gz
Patch0001: 0001-Roll-up-TIS-patches.patch
Patch0002: 0002-CGTS-8837-cinder-volume-cannot-be-deleted-after-swact.patch
+Patch0003: 0003-CGTS-9191-Add-nova-interface-config-option.patch
BuildArch: noarch
@@ -28,6 +29,7 @@ Puppet module for OpenStack Cinder
%setup -q -n openstack-cinder-%{upstream_version}
%patch0001 -p1
%patch0002 -p1
+%patch0003 -p1
find . -type f -name ".*" -exec rm {} +
find . -size 0 -exec rm {} +
--
1.8.3.1

View File

@ -1,3 +1,4 @@
0001-Update-package-versioning-for-TIS-format.patch
0002-Add-TIS-patches.patch
0003-CGTS-8837-cinder-volume-cannot-be-deleted-after-swact.patch
0004-CGTS-9191-Fix-cinder-calling-nova-over-public-ip.patch

View File

@ -0,0 +1,86 @@
From 60150282b2990ded72eb3c66481bddfeaaa67606 Mon Sep 17 00:00:00 2001
From: Ovidiu Poncea <ovidiu.poncea@windriver.com>
Date: Thu, 22 Mar 2018 05:06:57 -0400
Subject: [PATCH] CGTS-9191: Add nova/interface config option
Cinder stoped using two options, nova_catalog_info and nova_catalog_admin_info
and replaced them with nova/interface.
---
manifests/api.pp | 30 +++++++++++++++++++-----------
1 file changed, 19 insertions(+), 11 deletions(-)
diff --git a/manifests/api.pp b/manifests/api.pp
index b7106a8..7a35c8a 100644
--- a/manifests/api.pp
+++ b/manifests/api.pp
@@ -47,15 +47,6 @@
# requests. For example, boot-from-volume.
# Defaults to $::os_service_default
#
-# [*nova_catalog_info*]
-# (optional) Match this value when searching for nova in the service
-# catalog.
-# Defaults to 'compute:Compute Service:publicURL'
-#
-# [*nova_catalog_admin_info*]
-# (optional) Same as nova_catalog_info, but for admin endpoint.
-# Defaults to 'compute:Compute Service:adminURL'
-#
# [*service_workers*]
# (optional) Number of cinder-api workers
# Defaults to $::os_workers
@@ -151,6 +142,11 @@
# If this value is modified the catalog URLs in the keystone::auth class
# will also need to be changed to match.
#
+# [*nova_interface*]
+# (optional) Type of the nova endpoint to use. This endpoint will be
+# looked up in the keystone catalog. Allowed values: public, admin, internal
+# Defaults to 'public'.
+#
# DEPRECATED PARAMETERS
#
# [*validation_options*]
@@ -169,9 +165,17 @@
# try_sleep: 10
# Defaults to {}
#
+# [*nova_catalog_info*]
+# (optional) Match this value when searching for nova in the service
+# catalog.
+# Defaults to 'compute:Compute Service:publicURL'
+#
+# [*nova_catalog_admin_info*]
+# (optional) Same as nova_catalog_info, but for admin endpoint.
+# Defaults to 'compute:Compute Service:adminURL'
+#
+
class cinder::api (
- $nova_catalog_info = 'compute:Compute Service:publicURL',
- $nova_catalog_admin_info = 'compute:Compute Service:adminURL',
$os_region_name = $::os_service_default,
$privileged_user = false,
$os_privileged_user_name = $::os_service_default,
@@ -203,8 +207,11 @@ class cinder::api (
$ca_file = $::os_service_default,
$auth_strategy = 'keystone',
$osapi_volume_listen_port = $::os_service_default,
+ $nova_interface = 'public',
# DEPRECATED PARAMETERS
$validation_options = {},
+ $nova_catalog_info = 'compute:Compute Service:publicURL',
+ $nova_catalog_admin_info = 'compute:Compute Service:adminURL',
) inherits cinder::params {
include ::cinder::deps
@@ -289,6 +296,7 @@ running as a standalone service, or httpd for being run by a httpd server")
}
cinder_config {
+ 'nova/interface': value => $nova_interface;
'DEFAULT/nova_catalog_info': value => $nova_catalog_info;
'DEFAULT/nova_catalog_admin_info': value => $nova_catalog_admin_info;
}
--
1.8.3.1