Browse Source

Merge "Add short node name override support to manila" into stable/train

changes/95/704495/1
Zuul Gerrit Code Review 2 months ago
parent
commit
94a61362c6
3 changed files with 13 additions and 5 deletions
  1. +9
    -1
      manifests/profile/pacemaker/manila/share_bundle.pp
  2. +3
    -3
      spec/classes/tripleo_profile_pacemaker_manila_share_bundle_spec.rb
  3. +1
    -1
      spec/fixtures/hieradata/default.yaml

+ 9
- 1
manifests/profile/pacemaker/manila/share_bundle.pp View File

@@ -91,7 +91,15 @@ class tripleo::profile::pacemaker::manila::share_bundle (

if $step >= 2 and $pacemaker_master {
$manila_share_short_node_names = hiera('manila_share_short_node_names')
$manila_share_short_node_names.each |String $node_name| {

if (hiera('pacemaker_short_node_names_override', undef)) {
$pacemaker_short_node_names = hiera('pacemaker_short_node_names_override')
} else {
$pacemaker_short_node_names = hiera('pacemaker_short_node_names')
}

$pcmk_cinder_volume_nodes = intersection($manila_share_short_node_names, $pacemaker_short_node_names)
$pcmk_cinder_volume_nodes.each |String $node_name| {
pacemaker::property { "manila-share-role-${node_name}":
property => 'manila-share-role',
value => true,


+ 3
- 3
spec/classes/tripleo_profile_pacemaker_manila_share_bundle_spec.rb View File

@@ -36,8 +36,8 @@ describe 'tripleo::profile::pacemaker::manila::share_bundle' do
} }

it 'should create pacemaker properties' do
is_expected.to contain_pacemaker__property('manila-share-role-manila-1')
is_expected.to contain_pacemaker__property('manila-share-role-manila-2')
is_expected.to contain_pacemaker__property('manila-share-role-node.example.com')
is_expected.to_not contain_pacemaker__property('manila-share-role-manila-2')
end
end

@@ -48,7 +48,7 @@ describe 'tripleo::profile::pacemaker::manila::share_bundle' do
} }

it 'should not create pacemaker properties' do
is_expected.to_not contain_pacemaker__property('manila-share-role-manila-1')
is_expected.to_not contain_pacemaker__property('manila-share-role-node.example.com')
is_expected.to_not contain_pacemaker__property('manila-share-role-manila-2')
end
end


+ 1
- 1
spec/fixtures/hieradata/default.yaml View File

@@ -66,7 +66,7 @@ manila::rabbit_password: 'password'
manila::keystone::authtoken::password: 'password'
manila_share_short_bootstrap_node_name: 'node.example.com'
manila_share_short_node_names:
- 'manila-1'
- 'node.example.com'
- 'manila-2'
manila_api_short_bootstrap_node_name: node
# nova related items


Loading…
Cancel
Save