Merge "Revert "Enable cell_v2 setup by default""

This commit is contained in:
Jenkins 2017-01-13 19:21:06 +00:00 committed by Gerrit Code Review
commit a41d30806d
5 changed files with 21 additions and 42 deletions

View File

@ -32,8 +32,9 @@
# Defaults to undef
#
# [*setup_cell0*]
# (optional) Setup a cell0 for the cell_v2 functionality.
# Defaults to true
# (optional) Setup a cell0 for the cell_v2 functionality. This option will
# be set to true by default in Ocata when the cell v2 setup is mandatory.
# Defaults to false
#
class nova::db::mysql_api(
$password,
@ -43,7 +44,7 @@ class nova::db::mysql_api(
$charset = 'utf8',
$collate = 'utf8_general_ci',
$allowed_hosts = undef,
$setup_cell0 = true,
$setup_cell0 = false,
) {
include ::nova::deps

View File

@ -11,8 +11,9 @@
#
# [*cellv2_setup*]
# (optional) This flag toggles if we run the cell_v2 simple_cell_setup action
# with nova-manage.
# Defaults to true.
# with nova-manage. This flag will be set to true in Ocata when the cell v2
# setup is mandatory.
# Defaults to false.
#
# [*db_sync_timeout*]
# (optional) Timeout for the execution of the db_sync
@ -21,7 +22,7 @@
class nova::db::sync_api(
$extra_params = undef,
$db_sync_timeout = 300,
$cellv2_setup = true,
$cellv2_setup = false,
) {
include ::nova::deps

View File

@ -1,6 +0,0 @@
---
upgrade:
- The cell_v2 setup has been enabled by default. To skip it or
prevent it from running, set nova::db::mysql_api::setup_cell0 and
nova::db::sync_api::cellv2_setup to false.
as the prelude. This may mean repeating some details.

View File

@ -23,13 +23,7 @@ describe 'nova::db::mysql_api' do
:collate => 'utf8_general_ci',
)}
it { is_expected.to contain_openstacklib__db__mysql('nova_api_cell0').with(
:user => 'nova_api',
:password_hash => '*AA1420F182E88B9E5F874F6FBE7459291E8F4601',
:charset => 'utf8',
:collate => 'utf8_general_ci',
:create_user => false,
)}
it { is_expected.to_not contain_openstacklib__db__mysql('nova_api_cell0') }
end
context 'overriding allowed_hosts param to array' do
@ -46,13 +40,6 @@ describe 'nova::db::mysql_api' do
:collate => 'utf8_general_ci',
:allowed_hosts => ['127.0.0.1','%'],
)}
it { is_expected.to contain_openstacklib__db__mysql('nova_api_cell0').with(
:user => 'nova_api',
:password_hash => '*AA1420F182E88B9E5F874F6FBE7459291E8F4601',
:charset => 'utf8',
:collate => 'utf8_general_ci',
:allowed_hosts => ['127.0.0.1','%'],
)}
end
context 'overriding allowed_hosts param to string' do
@ -69,13 +56,6 @@ describe 'nova::db::mysql_api' do
:collate => 'utf8_general_ci',
:allowed_hosts => '192.168.1.1',
)}
it { is_expected.to contain_openstacklib__db__mysql('nova_api_cell0').with(
:user => 'nova_api',
:password_hash => '*AA1420F182E88B9E5F874F6FBE7459291E8F4601',
:charset => 'utf8',
:collate => 'utf8_general_ci',
:allowed_hosts => '192.168.1.1',
)}
end
context 'when overriding charset' do
@ -88,17 +68,20 @@ describe 'nova::db::mysql_api' do
it { is_expected.to contain_openstacklib__db__mysql('nova_api').with(
:charset => 'latin1',
)}
it { is_expected.to contain_openstacklib__db__mysql('nova_api_cell0').with(
:charset => 'latin1',
)}
end
context 'when disabling cell0 setup' do
context 'when enabling cell0 setup' do
let :params do
{ :setup_cell0 => false }.merge(required_params)
{ :setup_cell0 => true }.merge(required_params)
end
it { is_expected.to_not contain_openstacklib__db__mysql('nova_api_cell0') }
it { is_expected.to contain_openstacklib__db__mysql('nova_api_cell0').with(
:user => 'nova_api',
:password_hash => '*AA1420F182E88B9E5F874F6FBE7459291E8F4601',
:charset => 'utf8',
:collate => 'utf8_general_ci',
:create_user => false,
)}
end
end

View File

@ -16,14 +16,14 @@ describe 'nova::db::sync_api' do
:notify => 'Anchor[nova::dbsync_api::end]',
)
}
it { is_expected.to contain_class('nova::db::sync_cell_v2') }
it { is_expected.to_not contain_class('nova::db::sync_cell_v2') }
end
context "overriding extra_params" do
let :params do
{
:extra_params => '--config-file /etc/nova/nova.conf',
:cellv2_setup => false
:cellv2_setup => true
}
end
@ -39,7 +39,7 @@ describe 'nova::db::sync_api' do
:notify => 'Anchor[nova::dbsync_api::end]',
)
}
it { is_expected.to_not contain_class('nova::db::sync_cell_v2') }
it { is_expected.to contain_class('nova::db::sync_cell_v2') }
end
context "overriding db_sync_timeout" do