From dbe67005a59f90a1ffe8e2d8b550ec5d6ca27a7e Mon Sep 17 00:00:00 2001 From: Giulio Fidente Date: Tue, 19 Jan 2016 11:10:49 +0100 Subject: [PATCH] Permits configuration of Cinder enabled_backend via hieradata It is currently possible to provide arbitrary config settings for Cinder using the "cinder::config::cinder_config:" hiera key. To add a backend though particular one has to edit the list of enabled backends in Cinder too which isn't possible. This change will make it possible using a user-customizable array of backends to be enabled. Change-Id: Ic664c1c2b0f7b1b4b6be8b5064a38650694d4857 --- puppet/hieradata/controller.yaml | 1 + puppet/hieradata/volume.yaml | 2 ++ puppet/manifests/overcloud_controller.pp | 2 +- puppet/manifests/overcloud_controller_pacemaker.pp | 2 +- puppet/manifests/overcloud_volume.pp | 2 +- 5 files changed, 6 insertions(+), 3 deletions(-) diff --git a/puppet/hieradata/controller.yaml b/puppet/hieradata/controller.yaml index e0e0ffbcda..5cf25b39b3 100644 --- a/puppet/hieradata/controller.yaml +++ b/puppet/hieradata/controller.yaml @@ -99,6 +99,7 @@ ceilometer::agent::auth::auth_endpoint_type: 'internalURL' cinder::scheduler::scheduler_driver: cinder.scheduler.filter_scheduler.FilterScheduler cinder::cron::db_purge::destination: '/dev/null' cinder::host: hostgroup +cinder_user_enabled_backends: [] # heat heat::engine::configure_delegated_roles: false diff --git a/puppet/hieradata/volume.yaml b/puppet/hieradata/volume.yaml index f4cd78a91a..8640c0a7fa 100644 --- a/puppet/hieradata/volume.yaml +++ b/puppet/hieradata/volume.yaml @@ -9,4 +9,6 @@ cinder::config::cinder_config: DEFAULT/swift_catalog_info: value: 'object-store:swift:internalURL' +cinder_user_enabled_backends: [] + volume_classes: [] \ No newline at end of file diff --git a/puppet/manifests/overcloud_controller.pp b/puppet/manifests/overcloud_controller.pp index 14dde157c4..18b18c5a18 100644 --- a/puppet/manifests/overcloud_controller.pp +++ b/puppet/manifests/overcloud_controller.pp @@ -505,7 +505,7 @@ if hiera('step') >= 3 { $cinder_enabled_backends = delete_undef_values([$cinder_iscsi_backend, $cinder_rbd_backend, $cinder_eqlx_backend, $cinder_dellsc_backend, $cinder_netapp_backend, $cinder_nfs_backend]) class { '::cinder::backends' : - enabled_backends => $cinder_enabled_backends, + enabled_backends => union($cinder_enabled_backends, hiera('cinder_user_enabled_backends')), } # swift proxy diff --git a/puppet/manifests/overcloud_controller_pacemaker.pp b/puppet/manifests/overcloud_controller_pacemaker.pp index c527c26edc..dc58289a9c 100644 --- a/puppet/manifests/overcloud_controller_pacemaker.pp +++ b/puppet/manifests/overcloud_controller_pacemaker.pp @@ -885,7 +885,7 @@ if hiera('step') >= 3 { $cinder_enabled_backends = delete_undef_values([$cinder_iscsi_backend, $cinder_rbd_backend, $cinder_eqlx_backend, $cinder_dellsc_backend, $cinder_netapp_backend, $cinder_nfs_backend]) class { '::cinder::backends' : - enabled_backends => $cinder_enabled_backends, + enabled_backends => union($cinder_enabled_backends, hiera('cinder_user_enabled_backends')), } class { '::sahara': diff --git a/puppet/manifests/overcloud_volume.pp b/puppet/manifests/overcloud_volume.pp index 72cd36c334..66722f57d3 100644 --- a/puppet/manifests/overcloud_volume.pp +++ b/puppet/manifests/overcloud_volume.pp @@ -44,7 +44,7 @@ if $cinder_enable_iscsi { $cinder_enabled_backends = any2array($cinder_iscsi_backend) class { '::cinder::backends' : - enabled_backends => $cinder_enabled_backends, + enabled_backends => union($cinder_enabled_backends, hiera('cinder_user_enabled_backends')), } $snmpd_user = hiera('snmpd_readonly_user_name')