Merge "Run db-sync if nova packages are upgraded"

This commit is contained in:
Jenkins 2015-06-08 21:21:23 +00:00 committed by Gerrit Code Review
commit 524d9a2f21
2 changed files with 4 additions and 2 deletions

View File

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

View File

@ -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