Browse Source

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

changes/59/704559/1
Zuul 1 month ago
parent
commit
6243720acf
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

@@ -76,7 +76,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

@@ -49,7 +49,7 @@ manila::rabbit_password: 'password'
manila::backend::cephfs::cephfs_protocol_helper_type: 'NFS'
manila_share_short_bootstrap_node_name: 'node.example.com'
manila_share_short_node_names:
- 'manila-1'
- 'node.example.com'
- 'manila-2'
# nova related items
nova::rabbit_password: 'password'

Loading…
Cancel
Save