From af7265c1d84b0d0dd181d02c3f8e20ed6f1758a2 Mon Sep 17 00:00:00 2001 From: Emilien Macchi Date: Wed, 5 Mar 2014 17:52:00 +0100 Subject: [PATCH] network: db sync from havana tag bug #340 Signed-off-by: Emilien Macchi --- manifests/network/controller.pp | 2 +- spec/classes/cloud_network_controller_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/manifests/network/controller.pp b/manifests/network/controller.pp index 35a7a6cc..079de422 100644 --- a/manifests/network/controller.pp +++ b/manifests/network/controller.pp @@ -46,7 +46,7 @@ class cloud::network::controller( # We check if DB tables are created, if not we populate Neutron DB. # It's a hack to fit with our setup where we run MySQL/Galera exec {'neutron_db_sync': - command => '/usr/bin/neutron-db-manage --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade head', + command => '/usr/bin/neutron-db-manage --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade havana', unless => "/usr/bin/mysql neutron -h ${neutron_db_host} -u ${encoded_user} -p${encoded_password} -e \"show tables\" | /bin/grep Tables" } diff --git a/spec/classes/cloud_network_controller_spec.rb b/spec/classes/cloud_network_controller_spec.rb index a8904938..c861e557 100644 --- a/spec/classes/cloud_network_controller_spec.rb +++ b/spec/classes/cloud_network_controller_spec.rb @@ -90,7 +90,7 @@ describe 'cloud::network::controller' do it 'checks if Neutron DB is populated' do should contain_exec('neutron_db_sync').with( - :command => '/usr/bin/neutron-db-manage --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade head', + :command => '/usr/bin/neutron-db-manage --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade havana', :unless => '/usr/bin/mysql neutron -h 10.0.0.1 -u neutron -psecrete -e "show tables" | /bin/grep Tables' ) end