diff --git a/manifests/services/bgpvpn.pp b/manifests/services/bgpvpn.pp index 8f6b310e9..f3df69ced 100644 --- a/manifests/services/bgpvpn.pp +++ b/manifests/services/bgpvpn.pp @@ -68,7 +68,7 @@ class neutron::services::bgpvpn ( if $sync_db { Package<| title == $::neutron::params::bgpvpn_plugin_package |> ~> Exec['bgpvpn-db-sync'] exec { 'bgpvpn-db-sync': - command => 'neutron-db-manage --config-file /etc/neutron/neutron.conf --subproject networking-bgpvpn upgrade', + command => 'neutron-db-manage --config-file /etc/neutron/neutron.conf --subproject networking-bgpvpn upgrade head', path => '/usr/bin', subscribe => [ Anchor['neutron::install::end'], diff --git a/spec/classes/neutron_services_bgpvpn_spec.rb b/spec/classes/neutron_services_bgpvpn_spec.rb index a13b726a5..301be0055 100644 --- a/spec/classes/neutron_services_bgpvpn_spec.rb +++ b/spec/classes/neutron_services_bgpvpn_spec.rb @@ -38,6 +38,19 @@ describe 'neutron::services::bgpvpn' do :name => platform_params[:bgpvpn_package_name], ) end + + it 'runs neutron-db-sync' do + is_expected.to contain_exec('bgpvpn-db-sync').with( + :command => 'neutron-db-manage --config-file /etc/neutron/neutron.conf --subproject networking-bgpvpn upgrade head', + :path => '/usr/bin', + :subscribe => ['Anchor[neutron::install::end]', + 'Anchor[neutron::config::end]', + 'Anchor[neutron::dbsync::begin]' + ], + :notify => 'Anchor[neutron::dbsync::end]', + :refreshonly => 'true', + ) + end end context 'with multiple service providers' do