Add short node name override support to manila
In line with the cinder & cinder-backup services, we add
short node name override support to manila when implemented
with pacemaker.
This is required in order to complete the 'scale-up' upgrade
steps for manila similar to the implementation in
I3cfd4272449b207874723682903505d2bbdb435b
Included is also an update to the tests and their fixtures to
ensure that the unit tests for the manila data are consistent
with the other similar services (cinder volume and cinder
backup).
Related-Bug: #1838971
Change-Id: I2c468e608a8f70d031b9ba08521bb75f7094c048
(cherry picked from commit e1348fecc8
)
This commit is contained in:
parent
45a4a61114
commit
7162f649af
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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…
Reference in New Issue