From 93792028607b579e8c5d0ea7efa516b0a89f7155 Mon Sep 17 00:00:00 2001 From: Alan Bishop Date: Fri, 5 Oct 2018 13:37:31 -0400 Subject: [PATCH] Remove default value for cinder RBD backend_host Remove "hostgroup" as the fallback string for the default tripleo::profile::base::cinder::volume::rbd::cinder_rbd_backend_host value. The cinder_rbd_backend_host parameter is only relevant for HA deployments, when it's value is set by the pacemaker version of the cinder-volume.yaml TripleO heat template. For non-HA deployments, the parameter should be undefined. Closes-Bug: #1796359 Change-Id: I35e5b11bb57a7dd8a724102480b3e9ec56df0626 --- manifests/profile/base/cinder/volume/rbd.pp | 4 ++-- ...t-cinder-rbd-backend-host-2b37388637756c80.yaml | 14 ++++++++++++++ .../tripleo_profile_base_cinder_volume_rbd_spec.rb | 1 - 3 files changed, 16 insertions(+), 3 deletions(-) create mode 100644 releasenotes/notes/change-default-cinder-rbd-backend-host-2b37388637756c80.yaml diff --git a/manifests/profile/base/cinder/volume/rbd.pp b/manifests/profile/base/cinder/volume/rbd.pp index 04fe499d7..8cd44d051 100644 --- a/manifests/profile/base/cinder/volume/rbd.pp +++ b/manifests/profile/base/cinder/volume/rbd.pp @@ -28,7 +28,7 @@ # # [*cinder_rbd_backend_host*] # (Optional) String to use as backend_host in the backend stanza -# Defaults to hiera('cinder::backend_host', hiera('cinder::host', 'hostgroup')) +# Defaults to hiera('cinder::backend_host', hiera('cinder::host', undef)) # # [*cinder_rbd_ceph_conf*] # (Optional) The path to the Ceph cluster config file @@ -59,7 +59,7 @@ class tripleo::profile::base::cinder::volume::rbd ( $backend_name = hiera('cinder::backend::rbd::volume_backend_name', 'tripleo_ceph'), $backend_availability_zone = hiera('cinder::backend::rbd::backend_availability_zone', undef), - $cinder_rbd_backend_host = hiera('cinder::backend_host', hiera('cinder::host', 'hostgroup')), + $cinder_rbd_backend_host = hiera('cinder::backend_host', hiera('cinder::host', undef)), $cinder_rbd_ceph_conf = hiera('cinder::backend::rbd::rbd_ceph_conf', '/etc/ceph/ceph.conf'), $cinder_rbd_pool_name = 'volumes', $cinder_rbd_extra_pools = undef, diff --git a/releasenotes/notes/change-default-cinder-rbd-backend-host-2b37388637756c80.yaml b/releasenotes/notes/change-default-cinder-rbd-backend-host-2b37388637756c80.yaml new file mode 100644 index 000000000..2dd4bd465 --- /dev/null +++ b/releasenotes/notes/change-default-cinder-rbd-backend-host-2b37388637756c80.yaml @@ -0,0 +1,14 @@ +--- +upgrade: + - | + The tripleo::profile::base::cinder::volume::rbd::cinder_rbd_backend_host + default value has changed, and no longer defaults to "hostgroup" when + other hiera variables (cinder::backend_host and cinder::host) are + undefined. This ensures cinder's RBD backend_host is only set for + pacemaker (HA) deployments, when tripleo-heat-templates sets + cinder::backend_host to "hostgroup". + + When upgrading an existing non-HA deployment, the old "hostgroup" default + value can be preserved by assigning the hiera variable + tripleo::profile::base::cinder::volume::rbd::cinder_rbd_backend_host. + New non-HA deployments should leave this variable unset. diff --git a/spec/classes/tripleo_profile_base_cinder_volume_rbd_spec.rb b/spec/classes/tripleo_profile_base_cinder_volume_rbd_spec.rb index ca8dc31f1..2f05ad84f 100644 --- a/spec/classes/tripleo_profile_base_cinder_volume_rbd_spec.rb +++ b/spec/classes/tripleo_profile_base_cinder_volume_rbd_spec.rb @@ -41,7 +41,6 @@ describe 'tripleo::profile::base::cinder::volume::rbd' do context 'with defaults' do it 'should trigger complete configuration' do is_expected.to contain_cinder__backend__rbd('tripleo_ceph').with( - :backend_host => 'hostgroup', :rbd_ceph_conf => '/etc/ceph/ceph.conf', :rbd_pool => 'volumes', :rbd_user => 'openstack',