Fix sync_db in BGPVPN

We need to add head to neutron-db-manage in order to
run the command correctly.

Change-Id: I2be0fab671ec1a804d029afc6dc27d19a193b064
This commit is contained in:
Carlos Camacho 2017-03-10 23:44:27 +01:00 committed by Ricardo Noriega
parent e4d4144f74
commit cd835dadfd
2 changed files with 14 additions and 1 deletions

View File

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

View File

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