Fix cinder's default RBD backend_host

With patch [1] cinder's RBD backend_host no longer defaults to
'hostgroup'. The goal was to avoid adding any value to cinder's config.
Unfortunately, puppet-cinder supplies its own default value which is
inconsistent with TripleO's naming convention for cinder backends. This
patch adds the correct default value ($::hostname) for TripleO.

[1] https://review.openstack.org/608328

Change-Id: I4d3f4f5a10f0c38de483d68b7c0ed384aae2dcac
Related-Bug: #1796359
This commit is contained in:
Alan Bishop 2018-11-06 16:04:15 -05:00
parent d4e03df352
commit 6bdfeaa13b
2 changed files with 3 additions and 2 deletions

View File

@ -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', undef))
# Defaults to hiera('cinder::backend_host', hiera('cinder::host', $::hostname))
#
# [*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', undef)),
$cinder_rbd_backend_host = hiera('cinder::backend_host', hiera('cinder::host', $::hostname)),
$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,

View File

@ -41,6 +41,7 @@ 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 => 'node.example.com',
:rbd_ceph_conf => '/etc/ceph/ceph.conf',
:rbd_pool => 'volumes',
:rbd_user => 'openstack',