From be0ac8f320ef31329a70e3d4c2dfee871872dace Mon Sep 17 00:00:00 2001 From: Alex Schultz Date: Fri, 13 Jan 2017 16:40:52 +0000 Subject: [PATCH] Revert "Enable cell_v2 setup by default" This reverts commit 055f91446fa2e32eb2ee04f0db232bb7fc8cdba3. Change-Id: I063c0a062a4f391a932c60e48d3f2c0ba0e941bb Related-Bug: #1656276 --- manifests/db/mysql_api.pp | 7 ++-- manifests/db/sync_api.pp | 7 ++-- ...2-setup-default-true-569b431a5e987739.yaml | 6 --- spec/classes/nova_db_mysql_api_spec.rb | 37 +++++-------------- spec/classes/nova_db_sync_api_spec.rb | 6 +-- 5 files changed, 21 insertions(+), 42 deletions(-) delete mode 100644 releasenotes/notes/cell_v2-setup-default-true-569b431a5e987739.yaml diff --git a/manifests/db/mysql_api.pp b/manifests/db/mysql_api.pp index 498b0c460..a9336f5ab 100644 --- a/manifests/db/mysql_api.pp +++ b/manifests/db/mysql_api.pp @@ -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 diff --git a/manifests/db/sync_api.pp b/manifests/db/sync_api.pp index 962331b39..671bf6a2d 100644 --- a/manifests/db/sync_api.pp +++ b/manifests/db/sync_api.pp @@ -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 diff --git a/releasenotes/notes/cell_v2-setup-default-true-569b431a5e987739.yaml b/releasenotes/notes/cell_v2-setup-default-true-569b431a5e987739.yaml deleted file mode 100644 index c5403dca2..000000000 --- a/releasenotes/notes/cell_v2-setup-default-true-569b431a5e987739.yaml +++ /dev/null @@ -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. diff --git a/spec/classes/nova_db_mysql_api_spec.rb b/spec/classes/nova_db_mysql_api_spec.rb index 806c4c7be..68e7ba341 100644 --- a/spec/classes/nova_db_mysql_api_spec.rb +++ b/spec/classes/nova_db_mysql_api_spec.rb @@ -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 diff --git a/spec/classes/nova_db_sync_api_spec.rb b/spec/classes/nova_db_sync_api_spec.rb index 8dae60fb4..6e4c43ac4 100644 --- a/spec/classes/nova_db_sync_api_spec.rb +++ b/spec/classes/nova_db_sync_api_spec.rb @@ -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