From afe2bbd36877ebd9d0f7ce4a610ff3bc8d05fc2d Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Tue, 1 Sep 2020 20:24:48 +0900 Subject: [PATCH] Use keymgr_* parameters in cinder class ... because the same parameters in cinder::api class have been deprecated. Depends-on: https://review.opendev.org/#/c/739126/ Change-Id: I9407566f5a62bb79ddb48974e340c81d37e228f3 --- manifests/cinder.pp | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/manifests/cinder.pp b/manifests/cinder.pp index efa1e4e37..f671ee0a7 100644 --- a/manifests/cinder.pp +++ b/manifests/cinder.pp @@ -56,6 +56,17 @@ class openstack_integration::cinder ( class { 'cinder::logging': debug => true, } + if $volume_encryption { + $keymgr_backend = 'castellan.key_manager.barbican_key_manager.BarbicanKeyManager' + $keymgr_encryption_api_url = "${::openstack_integration::config::base_url}:9311" + $keymgr_encryption_auth_url = "${::openstack_integration::config::keystone_auth_uri}/v3" + } else { + # (TODO) amoralej - we need to define api_class until fix https://review.opendev.org/#/c/468252 in + # cinder is merged to unblock puppet promotion + $keymgr_backend = 'cinder.keymgr.conf_key_mgr.ConfKeyManager' + $keymgr_encryption_api_url = undef + $keymgr_encryption_auth_url = undef + } class { 'cinder': default_transport_url => os_transport_url({ 'transport' => $::openstack_integration::config::messaging_default_proto, @@ -76,17 +87,9 @@ class openstack_integration::cinder ( database_connection => 'mysql+pymysql://cinder:cinder@127.0.0.1/cinder?charset=utf8', rabbit_use_ssl => $::openstack_integration::config::ssl, amqp_sasl_mechanisms => 'PLAIN', - } - if $volume_encryption { - $keymgr_backend = 'castellan.key_manager.barbican_key_manager.BarbicanKeyManager' - $keymgr_encryption_api_url = "${::openstack_integration::config::base_url}:9311" - $keymgr_encryption_auth_url = "${::openstack_integration::config::keystone_auth_uri}/v3" - } else { - # (TODO) amoralej - we need to define api_class until fix https://review.opendev.org/#/c/468252 in - # cinder is merged to unblock puppet promotion - $keymgr_backend = 'cinder.keymgr.conf_key_mgr.ConfKeyManager' - $keymgr_encryption_api_url = undef - $keymgr_encryption_auth_url = undef + keymgr_backend => $keymgr_backend, + keymgr_encryption_api_url => $keymgr_encryption_api_url, + keymgr_encryption_auth_url => $keymgr_encryption_auth_url, } class { 'cinder::keystone::authtoken': password => 'a_big_secret', @@ -97,12 +100,9 @@ class openstack_integration::cinder ( memcached_servers => $::openstack_integration::config::memcached_servers, } class { 'cinder::api': - default_volume_type => 'BACKEND_1', - public_endpoint => "${::openstack_integration::config::base_url}:8776", - service_name => 'httpd', - keymgr_backend => $keymgr_backend, - keymgr_encryption_api_url => $keymgr_encryption_api_url, - keymgr_encryption_auth_url => $keymgr_encryption_auth_url, + default_volume_type => 'BACKEND_1', + public_endpoint => "${::openstack_integration::config::base_url}:8776", + service_name => 'httpd', } include apache class { 'cinder::wsgi::apache':