Make sync_db_api enabled by default

According to the release notes[0], in Mitaka a second database
specifically for the api is required. Flip sync_db_api to being
true by default.

[0] "Nova now requires that two databases are available and configured.
The existing nova database needs no changes, but a new nova_api database
needs to be setup."
http://docs.openstack.org/releasenotes/nova/mitaka.html

Change-Id: Ia5fa8ba70b7ce151e7e904f5e8f94658a98dd295
This commit is contained in:
Elizabeth K. Joseph 2016-04-09 10:35:11 -07:00
parent f0709b7d23
commit 4f01c3537c
4 changed files with 22 additions and 15 deletions

View File

@ -110,7 +110,7 @@
#
# [*sync_db_api*]
# (optional) Run nova-manage api_db sync on api nodes after installing the package.
# Defaults to false
# Defaults to true
#
# [*neutron_metadata_proxy_shared_secret*]
# (optional) Shared secret to validate proxies Neutron metadata requests
@ -193,7 +193,7 @@ class nova::api(
$osapi_compute_workers = $::processorcount,
$metadata_workers = $::processorcount,
$sync_db = true,
$sync_db_api = false,
$sync_db_api = true,
$neutron_metadata_proxy_shared_secret = undef,
$osapi_v3 = false,
$default_floating_pool = 'nova',

View File

@ -0,0 +1,8 @@
---
features:
- Make the nova_api database creation default to "true" since it is
now required in Mitaka
upgrade:
- When upgrading, be aware that the default value of sync_db_api has
changed from "false" to "true" for this database.

View File

@ -29,18 +29,22 @@ describe 'basic nova' do
# Nova resources
class { '::nova':
database_connection => 'mysql+pymysql://nova:a_big_secret@127.0.0.1/nova?charset=utf8',
rabbit_userid => 'nova',
rabbit_password => 'an_even_bigger_secret',
image_service => 'nova.image.glance.GlanceImageService',
glance_api_servers => 'localhost:9292',
verbose => true,
debug => true,
rabbit_host => '127.0.0.1',
database_connection => 'mysql+pymysql://nova:a_big_secret@127.0.0.1/nova?charset=utf8',
api_database_connection => 'mysql+pymysql://nova_api:a_big_secret@127.0.0.1/nova_api?charset=utf8',
rabbit_userid => 'nova',
rabbit_password => 'an_even_bigger_secret',
image_service => 'nova.image.glance.GlanceImageService',
glance_api_servers => 'localhost:9292',
verbose => true,
debug => true,
rabbit_host => '127.0.0.1',
}
class { '::nova::db::mysql':
password => 'a_big_secret',
}
class { '::nova::db::mysql_api':
password => 'a_big_secret',
}
class { '::nova::keystone::auth':
password => 'a_big_secret',
}

View File

@ -232,11 +232,6 @@ describe 'nova::api' do
}
"
end
before do
params.merge!({
:sync_db_api => true,
})
end
it { is_expected.to contain_nova_config('database/connection').with_value('mysql://user:pass@db/db1').with_secret(true) }
it { is_expected.to contain_nova_config('database/slave_connection').with_value('mysql://user:pass@slave/db1').with_secret(true) }