Revert "Move rabbit/kombu settings to oslo_messaging_rabbit section"

This reverts commit 96eafbd792.

Kilo deprecates these settings, but they still work. We should wait to
merge this until upstream distro packages are ready so that master is
not broken.

Change-Id: Ifa7782c6f2a9fc8a50e7724d6f5d7d2414c83690
This commit is contained in:
Colleen Murphy 2015-04-17 17:11:27 +00:00
parent 96eafbd792
commit 653f2948a4
2 changed files with 72 additions and 72 deletions

View File

@ -463,63 +463,63 @@ class nova(
if $rpc_backend == 'nova.openstack.common.rpc.impl_kombu' or $rpc_backend == 'rabbit' { if $rpc_backend == 'nova.openstack.common.rpc.impl_kombu' or $rpc_backend == 'rabbit' {
# I may want to support exporting and collecting these # I may want to support exporting and collecting these
nova_config { nova_config {
'oslo_messaging_rabbit/rabbit_password': value => $rabbit_password, secret => true; 'DEFAULT/rabbit_password': value => $rabbit_password, secret => true;
'oslo_messaging_rabbit/rabbit_userid': value => $rabbit_userid; 'DEFAULT/rabbit_userid': value => $rabbit_userid;
'oslo_messaging_rabbit/rabbit_virtual_host': value => $rabbit_virtual_host; 'DEFAULT/rabbit_virtual_host': value => $rabbit_virtual_host;
'oslo_messaging_rabbit/rabbit_use_ssl': value => $rabbit_use_ssl; 'DEFAULT/rabbit_use_ssl': value => $rabbit_use_ssl;
'DEFAULT/amqp_durable_queues': value => $amqp_durable_queues; 'DEFAULT/amqp_durable_queues': value => $amqp_durable_queues;
} }
if $rabbit_use_ssl { if $rabbit_use_ssl {
if $kombu_ssl_ca_certs { if $kombu_ssl_ca_certs {
nova_config { 'oslo_messaging_rabbit/kombu_ssl_ca_certs': value => $kombu_ssl_ca_certs; } nova_config { 'DEFAULT/kombu_ssl_ca_certs': value => $kombu_ssl_ca_certs; }
} else { } else {
nova_config { 'oslo_messaging_rabbit/kombu_ssl_ca_certs': ensure => absent; } nova_config { 'DEFAULT/kombu_ssl_ca_certs': ensure => absent; }
} }
if $kombu_ssl_certfile or $kombu_ssl_keyfile { if $kombu_ssl_certfile or $kombu_ssl_keyfile {
nova_config { nova_config {
'oslo_messaging_rabbit/kombu_ssl_certfile': value => $kombu_ssl_certfile; 'DEFAULT/kombu_ssl_certfile': value => $kombu_ssl_certfile;
'oslo_messaging_rabbit/kombu_ssl_keyfile': value => $kombu_ssl_keyfile; 'DEFAULT/kombu_ssl_keyfile': value => $kombu_ssl_keyfile;
} }
} else { } else {
nova_config { nova_config {
'oslo_messaging_rabbit/kombu_ssl_certfile': ensure => absent; 'DEFAULT/kombu_ssl_certfile': ensure => absent;
'oslo_messaging_rabbit/kombu_ssl_keyfile': ensure => absent; 'DEFAULT/kombu_ssl_keyfile': ensure => absent;
} }
} }
if $kombu_ssl_version { if $kombu_ssl_version {
nova_config { 'oslo_messaging_rabbit/kombu_ssl_version': value => $kombu_ssl_version; } nova_config { 'DEFAULT/kombu_ssl_version': value => $kombu_ssl_version; }
} else { } else {
nova_config { 'oslo_messaging_rabbit/kombu_ssl_version': ensure => absent; } nova_config { 'DEFAULT/kombu_ssl_version': ensure => absent; }
} }
} else { } else {
nova_config { nova_config {
'oslo_messaging_rabbit/kombu_ssl_ca_certs': ensure => absent; 'DEFAULT/kombu_ssl_ca_certs': ensure => absent;
'oslo_messaging_rabbit/kombu_ssl_certfile': ensure => absent; 'DEFAULT/kombu_ssl_certfile': ensure => absent;
'oslo_messaging_rabbit/kombu_ssl_keyfile': ensure => absent; 'DEFAULT/kombu_ssl_keyfile': ensure => absent;
'oslo_messaging_rabbit/kombu_ssl_version': ensure => absent; 'DEFAULT/kombu_ssl_version': ensure => absent;
} }
} }
if $rabbit_hosts { if $rabbit_hosts {
nova_config { 'oslo_messaging_rabbit/rabbit_hosts': value => join($rabbit_hosts, ',') } nova_config { 'DEFAULT/rabbit_hosts': value => join($rabbit_hosts, ',') }
} else { } else {
nova_config { 'oslo_messaging_rabbit/rabbit_host': value => $rabbit_host } nova_config { 'DEFAULT/rabbit_host': value => $rabbit_host }
nova_config { 'oslo_messaging_rabbit/rabbit_port': value => $rabbit_port } nova_config { 'DEFAULT/rabbit_port': value => $rabbit_port }
nova_config { 'oslo_messaging_rabbit/rabbit_hosts': value => "${rabbit_host}:${rabbit_port}" } nova_config { 'DEFAULT/rabbit_hosts': value => "${rabbit_host}:${rabbit_port}" }
} }
if $rabbit_ha_queues == undef { if $rabbit_ha_queues == undef {
if $rabbit_hosts { if $rabbit_hosts {
nova_config { 'oslo_messaging_rabbit/rabbit_ha_queues': value => true } nova_config { 'DEFAULT/rabbit_ha_queues': value => true }
} else { } else {
nova_config { 'oslo_messaging_rabbit/rabbit_ha_queues': value => false } nova_config { 'DEFAULT/rabbit_ha_queues': value => false }
} }
} else { } else {
nova_config { 'oslo_messaging_rabbit/rabbit_ha_queues': value => $rabbit_ha_queues } nova_config { 'DEFAULT/rabbit_ha_queues': value => $rabbit_ha_queues }
} }
} }

View File

@ -57,11 +57,11 @@ describe 'nova' do
it 'configures rabbit' do it 'configures rabbit' do
is_expected.to contain_nova_config('DEFAULT/rpc_backend').with_value('rabbit') is_expected.to contain_nova_config('DEFAULT/rpc_backend').with_value('rabbit')
is_expected.to contain_nova_config('oslo_messaging_rabbit/rabbit_host').with_value('localhost') is_expected.to contain_nova_config('DEFAULT/rabbit_host').with_value('localhost')
is_expected.to contain_nova_config('oslo_messaging_rabbit/rabbit_password').with_value('guest').with_secret(true) is_expected.to contain_nova_config('DEFAULT/rabbit_password').with_value('guest').with_secret(true)
is_expected.to contain_nova_config('oslo_messaging_rabbit/rabbit_port').with_value('5672') is_expected.to contain_nova_config('DEFAULT/rabbit_port').with_value('5672')
is_expected.to contain_nova_config('oslo_messaging_rabbit/rabbit_userid').with_value('guest') is_expected.to contain_nova_config('DEFAULT/rabbit_userid').with_value('guest')
is_expected.to contain_nova_config('oslo_messaging_rabbit/rabbit_virtual_host').with_value('/') is_expected.to contain_nova_config('DEFAULT/rabbit_virtual_host').with_value('/')
end end
it 'configures various things' do it 'configures various things' do
@ -128,11 +128,11 @@ describe 'nova' do
it 'configures rabbit' do it 'configures rabbit' do
is_expected.to contain_nova_config('DEFAULT/rpc_backend').with_value('rabbit') is_expected.to contain_nova_config('DEFAULT/rpc_backend').with_value('rabbit')
is_expected.to contain_nova_config('oslo_messaging_rabbit/rabbit_host').with_value('rabbit') is_expected.to contain_nova_config('DEFAULT/rabbit_host').with_value('rabbit')
is_expected.to contain_nova_config('oslo_messaging_rabbit/rabbit_password').with_value('password').with_secret(true) is_expected.to contain_nova_config('DEFAULT/rabbit_password').with_value('password').with_secret(true)
is_expected.to contain_nova_config('oslo_messaging_rabbit/rabbit_port').with_value('5673') is_expected.to contain_nova_config('DEFAULT/rabbit_port').with_value('5673')
is_expected.to contain_nova_config('oslo_messaging_rabbit/rabbit_userid').with_value('rabbit_user') is_expected.to contain_nova_config('DEFAULT/rabbit_userid').with_value('rabbit_user')
is_expected.to contain_nova_config('oslo_messaging_rabbit/rabbit_virtual_host').with_value('/') is_expected.to contain_nova_config('DEFAULT/rabbit_virtual_host').with_value('/')
end end
it 'configures memcached_servers' do it 'configures memcached_servers' do
@ -221,16 +221,16 @@ describe 'nova' do
end end
it 'configures rabbit' do it 'configures rabbit' do
is_expected.to_not contain_nova_config('oslo_messaging_rabbit/rabbit_host') is_expected.to_not contain_nova_config('DEFAULT/rabbit_host')
is_expected.to_not contain_nova_config('oslo_messaging_rabbit/rabbit_port') is_expected.to_not contain_nova_config('DEFAULT/rabbit_port')
is_expected.to contain_nova_config('oslo_messaging_rabbit/rabbit_hosts').with_value('rabbit:5673,rabbit2:5674') is_expected.to contain_nova_config('DEFAULT/rabbit_hosts').with_value('rabbit:5673,rabbit2:5674')
is_expected.to contain_nova_config('oslo_messaging_rabbit/rabbit_ha_queues').with_value(true) is_expected.to contain_nova_config('DEFAULT/rabbit_ha_queues').with_value(true)
is_expected.to contain_nova_config('oslo_messaging_rabbit/rabbit_use_ssl').with_value(false) is_expected.to contain_nova_config('DEFAULT/rabbit_use_ssl').with_value(false)
is_expected.to contain_nova_config('DEFAULT/amqp_durable_queues').with_value(false) is_expected.to contain_nova_config('DEFAULT/amqp_durable_queues').with_value(false)
is_expected.to contain_nova_config('oslo_messaging_rabbit/kombu_ssl_ca_certs').with_ensure('absent') is_expected.to contain_nova_config('DEFAULT/kombu_ssl_ca_certs').with_ensure('absent')
is_expected.to contain_nova_config('oslo_messaging_rabbit/kombu_ssl_certfile').with_ensure('absent') is_expected.to contain_nova_config('DEFAULT/kombu_ssl_certfile').with_ensure('absent')
is_expected.to contain_nova_config('oslo_messaging_rabbit/kombu_ssl_keyfile').with_ensure('absent') is_expected.to contain_nova_config('DEFAULT/kombu_ssl_keyfile').with_ensure('absent')
is_expected.to contain_nova_config('oslo_messaging_rabbit/kombu_ssl_version').with_ensure('absent') is_expected.to contain_nova_config('DEFAULT/kombu_ssl_version').with_ensure('absent')
end end
end end
@ -240,11 +240,11 @@ describe 'nova' do
end end
it 'configures rabbit' do it 'configures rabbit' do
is_expected.to_not contain_nova_config('oslo_messaging_rabbit/rabbit_host') is_expected.to_not contain_nova_config('DEFAULT/rabbit_host')
is_expected.to_not contain_nova_config('oslo_messaging_rabbit/rabbit_port') is_expected.to_not contain_nova_config('DEFAULT/rabbit_port')
is_expected.to contain_nova_config('oslo_messaging_rabbit/rabbit_hosts').with_value('rabbit:5673') is_expected.to contain_nova_config('DEFAULT/rabbit_hosts').with_value('rabbit:5673')
is_expected.to contain_nova_config('oslo_messaging_rabbit/rabbit_ha_queues').with_value(true) is_expected.to contain_nova_config('DEFAULT/rabbit_ha_queues').with_value(true)
is_expected.to contain_nova_config('oslo_messaging_rabbit/rabbit_use_ssl').with_value(false) is_expected.to contain_nova_config('DEFAULT/rabbit_use_ssl').with_value(false)
is_expected.to contain_nova_config('DEFAULT/amqp_durable_queues').with_value(false) is_expected.to contain_nova_config('DEFAULT/amqp_durable_queues').with_value(false)
end end
end end
@ -255,7 +255,7 @@ describe 'nova' do
end end
it 'configures rabbit' do it 'configures rabbit' do
is_expected.to contain_nova_config('oslo_messaging_rabbit/rabbit_ha_queues').with_value(true) is_expected.to contain_nova_config('DEFAULT/rabbit_ha_queues').with_value(true)
end end
end end
@ -266,16 +266,16 @@ describe 'nova' do
end end
it 'configures rabbit' do it 'configures rabbit' do
is_expected.to_not contain_nova_config('oslo_messaging_rabbit/rabbit_host') is_expected.to_not contain_nova_config('DEFAULT/rabbit_host')
is_expected.to_not contain_nova_config('oslo_messaging_rabbit/rabbit_port') is_expected.to_not contain_nova_config('DEFAULT/rabbit_port')
is_expected.to contain_nova_config('oslo_messaging_rabbit/rabbit_hosts').with_value('rabbit:5673') is_expected.to contain_nova_config('DEFAULT/rabbit_hosts').with_value('rabbit:5673')
is_expected.to contain_nova_config('oslo_messaging_rabbit/rabbit_ha_queues').with_value(true) is_expected.to contain_nova_config('DEFAULT/rabbit_ha_queues').with_value(true)
is_expected.to contain_nova_config('oslo_messaging_rabbit/rabbit_use_ssl').with_value(false) is_expected.to contain_nova_config('DEFAULT/rabbit_use_ssl').with_value(false)
is_expected.to contain_nova_config('DEFAULT/amqp_durable_queues').with_value(true) is_expected.to contain_nova_config('DEFAULT/amqp_durable_queues').with_value(true)
is_expected.to contain_nova_config('oslo_messaging_rabbit/kombu_ssl_ca_certs').with_ensure('absent') is_expected.to contain_nova_config('DEFAULT/kombu_ssl_ca_certs').with_ensure('absent')
is_expected.to contain_nova_config('oslo_messaging_rabbit/kombu_ssl_certfile').with_ensure('absent') is_expected.to contain_nova_config('DEFAULT/kombu_ssl_certfile').with_ensure('absent')
is_expected.to contain_nova_config('oslo_messaging_rabbit/kombu_ssl_keyfile').with_ensure('absent') is_expected.to contain_nova_config('DEFAULT/kombu_ssl_keyfile').with_ensure('absent')
is_expected.to contain_nova_config('oslo_messaging_rabbit/kombu_ssl_version').with_ensure('absent') is_expected.to contain_nova_config('DEFAULT/kombu_ssl_version').with_ensure('absent')
end end
end end
@ -290,11 +290,11 @@ describe 'nova' do
end end
it 'configures rabbit' do it 'configures rabbit' do
is_expected.to contain_nova_config('oslo_messaging_rabbit/rabbit_use_ssl').with_value(true) is_expected.to contain_nova_config('DEFAULT/rabbit_use_ssl').with_value(true)
is_expected.to contain_nova_config('oslo_messaging_rabbit/kombu_ssl_ca_certs').with_value('/etc/ca.cert') is_expected.to contain_nova_config('DEFAULT/kombu_ssl_ca_certs').with_value('/etc/ca.cert')
is_expected.to contain_nova_config('oslo_messaging_rabbit/kombu_ssl_certfile').with_value('/etc/certfile') is_expected.to contain_nova_config('DEFAULT/kombu_ssl_certfile').with_value('/etc/certfile')
is_expected.to contain_nova_config('oslo_messaging_rabbit/kombu_ssl_keyfile').with_value('/etc/key') is_expected.to contain_nova_config('DEFAULT/kombu_ssl_keyfile').with_value('/etc/key')
is_expected.to contain_nova_config('oslo_messaging_rabbit/kombu_ssl_version').with_value('TLSv1') is_expected.to contain_nova_config('DEFAULT/kombu_ssl_version').with_value('TLSv1')
end end
end end
@ -305,11 +305,11 @@ describe 'nova' do
end end
it 'configures rabbit' do it 'configures rabbit' do
is_expected.to contain_nova_config('oslo_messaging_rabbit/rabbit_use_ssl').with_value(true) is_expected.to contain_nova_config('DEFAULT/rabbit_use_ssl').with_value(true)
is_expected.to contain_nova_config('oslo_messaging_rabbit/kombu_ssl_ca_certs').with_ensure('absent') is_expected.to contain_nova_config('DEFAULT/kombu_ssl_ca_certs').with_ensure('absent')
is_expected.to contain_nova_config('oslo_messaging_rabbit/kombu_ssl_certfile').with_ensure('absent') is_expected.to contain_nova_config('DEFAULT/kombu_ssl_certfile').with_ensure('absent')
is_expected.to contain_nova_config('oslo_messaging_rabbit/kombu_ssl_keyfile').with_ensure('absent') is_expected.to contain_nova_config('DEFAULT/kombu_ssl_keyfile').with_ensure('absent')
is_expected.to contain_nova_config('oslo_messaging_rabbit/kombu_ssl_version').with_value('TLSv1') is_expected.to contain_nova_config('DEFAULT/kombu_ssl_version').with_value('TLSv1')
end end
end end
@ -323,11 +323,11 @@ describe 'nova' do
end end
it 'configures rabbit' do it 'configures rabbit' do
is_expected.to contain_nova_config('oslo_messaging_rabbit/rabbit_use_ssl').with_value('false') is_expected.to contain_nova_config('DEFAULT/rabbit_use_ssl').with_value('false')
is_expected.to contain_nova_config('oslo_messaging_rabbit/kombu_ssl_ca_certs').with_ensure('absent') is_expected.to contain_nova_config('DEFAULT/kombu_ssl_ca_certs').with_ensure('absent')
is_expected.to contain_nova_config('oslo_messaging_rabbit/kombu_ssl_certfile').with_ensure('absent') is_expected.to contain_nova_config('DEFAULT/kombu_ssl_certfile').with_ensure('absent')
is_expected.to contain_nova_config('oslo_messaging_rabbit/kombu_ssl_keyfile').with_ensure('absent') is_expected.to contain_nova_config('DEFAULT/kombu_ssl_keyfile').with_ensure('absent')
is_expected.to contain_nova_config('oslo_messaging_rabbit/kombu_ssl_version').with_ensure('absent') is_expected.to contain_nova_config('DEFAULT/kombu_ssl_version').with_ensure('absent')
end end
end end