Enable cell_v2 setup by default
In Ocata, nova has made the cell_v2 setup mandatory as part of the upgrade process in I72fb724dc13e1a5f4e97c58915b538ba761c582d. This change makes the cell_v2 setup part of the default install for Ocata as this feature will be required for some parts of nova in Ocata. Depends-On: I693239ff5026f58a65eb6278b1a8fcb97af4f561 Depends-On: I08efa36f5f62ae406ab20e8da77c01fbf3d9b11f Change-Id: I7839e3c8bfdec96b0d372e7a9d3511289e8004b9 Related-Bug: #1649341
This commit is contained in:
parent
e5e211e26b
commit
055f91446f
manifests/db
releasenotes/notes
spec/classes
@ -32,9 +32,8 @@
|
||||
# Defaults to undef
|
||||
#
|
||||
# [*setup_cell0*]
|
||||
# (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
|
||||
# (optional) Setup a cell0 for the cell_v2 functionality.
|
||||
# Defaults to true
|
||||
#
|
||||
class nova::db::mysql_api(
|
||||
$password,
|
||||
@ -44,7 +43,7 @@ class nova::db::mysql_api(
|
||||
$charset = 'utf8',
|
||||
$collate = 'utf8_general_ci',
|
||||
$allowed_hosts = undef,
|
||||
$setup_cell0 = false,
|
||||
$setup_cell0 = true,
|
||||
) {
|
||||
|
||||
include ::nova::deps
|
||||
|
@ -11,13 +11,12 @@
|
||||
#
|
||||
# [*cellv2_setup*]
|
||||
# (optional) This flag toggles if we run the cell_v2 simple_cell_setup action
|
||||
# with nova-manage. This flag will be set to true in Ocata when the cell v2
|
||||
# setup is mandatory.
|
||||
# Defaults to false.
|
||||
# with nova-manage.
|
||||
# Defaults to true.
|
||||
#
|
||||
class nova::db::sync_api(
|
||||
$extra_params = undef,
|
||||
$cellv2_setup = false,
|
||||
$cellv2_setup = true,
|
||||
) {
|
||||
|
||||
include ::nova::deps
|
||||
|
@ -0,0 +1,6 @@
|
||||
---
|
||||
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.
|
@ -23,7 +23,13 @@ describe 'nova::db::mysql_api' do
|
||||
:collate => 'utf8_general_ci',
|
||||
)}
|
||||
|
||||
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
|
||||
|
||||
context 'overriding allowed_hosts param to array' do
|
||||
@ -40,6 +46,13 @@ 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
|
||||
@ -56,6 +69,13 @@ 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
|
||||
@ -68,20 +88,17 @@ 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 enabling cell0 setup' do
|
||||
context 'when disabling cell0 setup' do
|
||||
let :params do
|
||||
{ :setup_cell0 => true }.merge(required_params)
|
||||
{ :setup_cell0 => false }.merge(required_params)
|
||||
end
|
||||
|
||||
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
|
||||
|
||||
end
|
||||
|
@ -15,14 +15,14 @@ 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 extra_params" do
|
||||
let :params do
|
||||
{
|
||||
:extra_params => '--config-file /etc/nova/nova.conf',
|
||||
:cellv2_setup => true
|
||||
:cellv2_setup => false
|
||||
}
|
||||
end
|
||||
|
||||
@ -37,7 +37,7 @@ 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
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user