Merge "Run db-sync if nova packages are upgraded"
This commit is contained in:
commit
524d9a2f21
@ -346,7 +346,9 @@ class nova::api(
|
||||
# Added arg and if statement prevents this from being run
|
||||
# where db is not active i.e. the compute
|
||||
if $sync_db {
|
||||
Package<| title == 'nova-api' |> -> Exec['nova-db-sync']
|
||||
Package<| title == $::nova::params::api_package_name |> ~> Exec['nova-db-sync']
|
||||
Package<| title == $::nova::params::common_package_name |> ~> Exec['nova-db-sync']
|
||||
|
||||
exec { 'nova-db-sync':
|
||||
command => '/usr/bin/nova-manage db sync',
|
||||
refreshonly => true,
|
||||
|
@ -28,9 +28,9 @@ describe 'nova::api' do
|
||||
is_expected.to contain_package('nova-api').with(
|
||||
:name => platform_params[:nova_api_package],
|
||||
:ensure => 'present',
|
||||
:notify => 'Service[nova-api]',
|
||||
:tag => ['openstack']
|
||||
)
|
||||
is_expected.to contain_package('nova-api').that_notifies('Service[nova-api]')
|
||||
is_expected.to_not contain_exec('validate_nova_api')
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user