Run cinder's db sync only on bootstrap node
The sync_db variable (which is True only on bootstrap node) needs to be passed to the ::cinder::api resource to ensure the db sync only happens on the bootstrap node. Closes-Bug: #1779112 Change-Id: Ib7fcafbe769aadfcc58323ba3a06fa28a80a488a
This commit is contained in:
parent
7572d41795
commit
34810fc361
@ -100,6 +100,7 @@ class tripleo::profile::base::cinder::api (
|
||||
}
|
||||
|
||||
class { '::cinder::api':
|
||||
sync_db => $sync_db,
|
||||
keymgr_backend => $keymgr_backend_real,
|
||||
}
|
||||
include ::tripleo::profile::base::apache
|
||||
|
@ -45,6 +45,7 @@ describe 'tripleo::profile::base::cinder::api' do
|
||||
|
||||
it 'should trigger complete configuration' do
|
||||
is_expected.to contain_class('cinder::api').with(
|
||||
:sync_db => true,
|
||||
# Verify legacy key manager is enabled when none is set in hiera.
|
||||
:keymgr_backend => 'cinder.keymgr.conf_key_mgr.ConfKeyManager',
|
||||
)
|
||||
@ -64,14 +65,30 @@ describe 'tripleo::profile::base::cinder::api' do
|
||||
end
|
||||
end
|
||||
|
||||
context 'with step 4' do
|
||||
context 'with step 4 on bootstrap node' do
|
||||
let(:params) { {
|
||||
:step => 4,
|
||||
:step => 4,
|
||||
:bootstrap_node => 'node.example.com',
|
||||
} }
|
||||
|
||||
it 'should trigger complete configuration' do
|
||||
is_expected.to contain_class('cinder::api').with(
|
||||
# Verify proper key manager is enabled when value is set in hiera.
|
||||
:sync_db => true,
|
||||
:keymgr_backend => 'castellan.key_manager.barbican_key_manager.BarbicanKeyManager',
|
||||
)
|
||||
is_expected.to contain_class('cinder::ceilometer')
|
||||
end
|
||||
end
|
||||
|
||||
context 'with step 4 not on bootstrap node' do
|
||||
let(:params) { {
|
||||
:step => 4,
|
||||
:bootstrap_node => 'other.example.com',
|
||||
} }
|
||||
|
||||
it 'should trigger complete configuration but with no db sync' do
|
||||
is_expected.to contain_class('cinder::api').with(
|
||||
:sync_db => false,
|
||||
:keymgr_backend => 'castellan.key_manager.barbican_key_manager.BarbicanKeyManager',
|
||||
)
|
||||
is_expected.to contain_class('cinder::ceilometer')
|
||||
|
Loading…
Reference in New Issue
Block a user