Don't sync database by default

https://review.openstack.org/#/c/76358 introduced a new sync_db
parameter and set it to true by default.  Unfortunately there
seem to be many cases where this causes problems.  One is when
using the OVS plugin with the [database] section stored in
neutron.conf rather than in the ovs_neutron_plugin.ini file.
In such cases the migration will error out with due to being
unable to connect.  This is particularly problematic for users
in that no changes to the composition layer are necessary to
hit the error since sync_db is set to true by default: to avoid
the problem they need to make composition layer change to explicitly
set it to false.  This patch resolves the problem by setting the
parameter to false by default rather than true.  This enables
users who want the migration to run to do so without impacting
users who haven't been expecting the new behavior.

Change-Id: Id8c116212132b6d75ae14019fc6a65447f226c6d
Closes-Bug: #1288975
This commit is contained in:
Mark T. Voelker 2014-03-06 15:39:50 -05:00
parent efb77ecc2c
commit 0229d358ae
2 changed files with 13 additions and 13 deletions
manifests
spec/classes

@ -103,7 +103,7 @@
#
# [*sync_db*]
# (optional) Run neutron-db-manage on api nodes after installing the package.
# Defaults to true
# Defaults to false
#
# [*api_workers*]
# (optional) Number of separate worker processes to spawn.
@ -145,7 +145,7 @@ class neutron::server (
$database_max_retries = 10,
$database_idle_timeout = 3600,
$database_retry_interval = 10,
$sync_db = true,
$sync_db = false,
$api_workers = '0',
$agent_down_time = '9',
$report_interval = '4',

@ -23,7 +23,7 @@ describe 'neutron::server' do
:database_max_retries => '10',
:database_idle_timeout => '3600',
:database_retry_interval => '10',
:sync_db => true,
:sync_db => false,
:api_workers => '0',
:agent_down_time => '9',
:report_interval => '4',
@ -75,13 +75,7 @@ describe 'neutron::server' do
:ensure => 'running',
:require => 'Class[Neutron]'
)
should contain_exec('neutron-db-sync').with(
:command => 'neutron-db-manage --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugin.ini upgrade head',
:path => '/usr/bin',
:before => 'Service[neutron-server]',
:require => 'Neutron_config[database/connection]',
:refreshonly => true
)
should_not contain_exec('neutron-db-sync')
should contain_neutron_api_config('filter:authtoken/auth_admin_prefix').with(
:ensure => 'absent'
)
@ -146,11 +140,17 @@ describe 'neutron::server' do
shared_examples_for 'a neutron server without database synchronization' do
before do
params.merge!(
:sync_db => false
:sync_db => true
)
end
it 'should not exec neutron-db-sync' do
should_not contain_exec('neutron-db-sync')
it 'should exec neutron-db-sync' do
should contain_exec('neutron-db-sync').with(
:command => 'neutron-db-manage --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugin.ini upgrade head',
:path => '/usr/bin',
:before => 'Service[neutron-server]',
:require => 'Neutron_config[database/connection]',
:refreshonly => true
)
end
end