From 4f01c3537c68c4c25b94023e7c16bd2be2cb6526 Mon Sep 17 00:00:00 2001 From: "Elizabeth K. Joseph" Date: Sat, 9 Apr 2016 10:35:11 -0700 Subject: [PATCH] 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 --- manifests/api.pp | 4 ++-- .../add_nova_api_db-62e459588e14a92e.yaml | 8 ++++++++ spec/acceptance/nova_wsgi_apache_spec.rb | 20 +++++++++++-------- spec/classes/nova_api_spec.rb | 5 ----- 4 files changed, 22 insertions(+), 15 deletions(-) create mode 100644 releasenotes/notes/add_nova_api_db-62e459588e14a92e.yaml diff --git a/manifests/api.pp b/manifests/api.pp index 98e43bb19..38b16b391 100644 --- a/manifests/api.pp +++ b/manifests/api.pp @@ -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', diff --git a/releasenotes/notes/add_nova_api_db-62e459588e14a92e.yaml b/releasenotes/notes/add_nova_api_db-62e459588e14a92e.yaml new file mode 100644 index 000000000..990ada265 --- /dev/null +++ b/releasenotes/notes/add_nova_api_db-62e459588e14a92e.yaml @@ -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. diff --git a/spec/acceptance/nova_wsgi_apache_spec.rb b/spec/acceptance/nova_wsgi_apache_spec.rb index 6b6002f4b..b024ca706 100644 --- a/spec/acceptance/nova_wsgi_apache_spec.rb +++ b/spec/acceptance/nova_wsgi_apache_spec.rb @@ -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', } diff --git a/spec/classes/nova_api_spec.rb b/spec/classes/nova_api_spec.rb index 1b18acba5..9be472477 100644 --- a/spec/classes/nova_api_spec.rb +++ b/spec/classes/nova_api_spec.rb @@ -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) }