Merge "Revert "Revert "Move rabbit/kombu settings to oslo_messaging_rabbit section"""
This commit is contained in:
commit
68c0cfe935
@ -459,63 +459,63 @@ class nova(
|
||||
if $rpc_backend == 'nova.openstack.common.rpc.impl_kombu' or $rpc_backend == 'rabbit' {
|
||||
# I may want to support exporting and collecting these
|
||||
nova_config {
|
||||
'DEFAULT/rabbit_password': value => $rabbit_password, secret => true;
|
||||
'DEFAULT/rabbit_userid': value => $rabbit_userid;
|
||||
'DEFAULT/rabbit_virtual_host': value => $rabbit_virtual_host;
|
||||
'DEFAULT/rabbit_use_ssl': value => $rabbit_use_ssl;
|
||||
'oslo_messaging_rabbit/rabbit_password': value => $rabbit_password, secret => true;
|
||||
'oslo_messaging_rabbit/rabbit_userid': value => $rabbit_userid;
|
||||
'oslo_messaging_rabbit/rabbit_virtual_host': value => $rabbit_virtual_host;
|
||||
'oslo_messaging_rabbit/rabbit_use_ssl': value => $rabbit_use_ssl;
|
||||
'DEFAULT/amqp_durable_queues': value => $amqp_durable_queues;
|
||||
}
|
||||
|
||||
if $rabbit_use_ssl {
|
||||
|
||||
if $kombu_ssl_ca_certs {
|
||||
nova_config { 'DEFAULT/kombu_ssl_ca_certs': value => $kombu_ssl_ca_certs; }
|
||||
nova_config { 'oslo_messaging_rabbit/kombu_ssl_ca_certs': value => $kombu_ssl_ca_certs; }
|
||||
} else {
|
||||
nova_config { 'DEFAULT/kombu_ssl_ca_certs': ensure => absent; }
|
||||
nova_config { 'oslo_messaging_rabbit/kombu_ssl_ca_certs': ensure => absent; }
|
||||
}
|
||||
|
||||
if $kombu_ssl_certfile or $kombu_ssl_keyfile {
|
||||
nova_config {
|
||||
'DEFAULT/kombu_ssl_certfile': value => $kombu_ssl_certfile;
|
||||
'DEFAULT/kombu_ssl_keyfile': value => $kombu_ssl_keyfile;
|
||||
'oslo_messaging_rabbit/kombu_ssl_certfile': value => $kombu_ssl_certfile;
|
||||
'oslo_messaging_rabbit/kombu_ssl_keyfile': value => $kombu_ssl_keyfile;
|
||||
}
|
||||
} else {
|
||||
nova_config {
|
||||
'DEFAULT/kombu_ssl_certfile': ensure => absent;
|
||||
'DEFAULT/kombu_ssl_keyfile': ensure => absent;
|
||||
'oslo_messaging_rabbit/kombu_ssl_certfile': ensure => absent;
|
||||
'oslo_messaging_rabbit/kombu_ssl_keyfile': ensure => absent;
|
||||
}
|
||||
}
|
||||
|
||||
if $kombu_ssl_version {
|
||||
nova_config { 'DEFAULT/kombu_ssl_version': value => $kombu_ssl_version; }
|
||||
nova_config { 'oslo_messaging_rabbit/kombu_ssl_version': value => $kombu_ssl_version; }
|
||||
} else {
|
||||
nova_config { 'DEFAULT/kombu_ssl_version': ensure => absent; }
|
||||
nova_config { 'oslo_messaging_rabbit/kombu_ssl_version': ensure => absent; }
|
||||
}
|
||||
|
||||
} else {
|
||||
nova_config {
|
||||
'DEFAULT/kombu_ssl_ca_certs': ensure => absent;
|
||||
'DEFAULT/kombu_ssl_certfile': ensure => absent;
|
||||
'DEFAULT/kombu_ssl_keyfile': ensure => absent;
|
||||
'DEFAULT/kombu_ssl_version': ensure => absent;
|
||||
'oslo_messaging_rabbit/kombu_ssl_ca_certs': ensure => absent;
|
||||
'oslo_messaging_rabbit/kombu_ssl_certfile': ensure => absent;
|
||||
'oslo_messaging_rabbit/kombu_ssl_keyfile': ensure => absent;
|
||||
'oslo_messaging_rabbit/kombu_ssl_version': ensure => absent;
|
||||
}
|
||||
}
|
||||
|
||||
if $rabbit_hosts {
|
||||
nova_config { 'DEFAULT/rabbit_hosts': value => join($rabbit_hosts, ',') }
|
||||
nova_config { 'oslo_messaging_rabbit/rabbit_hosts': value => join($rabbit_hosts, ',') }
|
||||
} else {
|
||||
nova_config { 'DEFAULT/rabbit_host': value => $rabbit_host }
|
||||
nova_config { 'DEFAULT/rabbit_port': value => $rabbit_port }
|
||||
nova_config { 'DEFAULT/rabbit_hosts': value => "${rabbit_host}:${rabbit_port}" }
|
||||
nova_config { 'oslo_messaging_rabbit/rabbit_host': value => $rabbit_host }
|
||||
nova_config { 'oslo_messaging_rabbit/rabbit_port': value => $rabbit_port }
|
||||
nova_config { 'oslo_messaging_rabbit/rabbit_hosts': value => "${rabbit_host}:${rabbit_port}" }
|
||||
}
|
||||
if $rabbit_ha_queues == undef {
|
||||
if $rabbit_hosts {
|
||||
nova_config { 'DEFAULT/rabbit_ha_queues': value => true }
|
||||
nova_config { 'oslo_messaging_rabbit/rabbit_ha_queues': value => true }
|
||||
} else {
|
||||
nova_config { 'DEFAULT/rabbit_ha_queues': value => false }
|
||||
nova_config { 'oslo_messaging_rabbit/rabbit_ha_queues': value => false }
|
||||
}
|
||||
} else {
|
||||
nova_config { 'DEFAULT/rabbit_ha_queues': value => $rabbit_ha_queues }
|
||||
nova_config { 'oslo_messaging_rabbit/rabbit_ha_queues': value => $rabbit_ha_queues }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -57,11 +57,11 @@ describe 'nova' do
|
||||
|
||||
it 'configures rabbit' do
|
||||
is_expected.to contain_nova_config('DEFAULT/rpc_backend').with_value('rabbit')
|
||||
is_expected.to contain_nova_config('DEFAULT/rabbit_host').with_value('localhost')
|
||||
is_expected.to contain_nova_config('DEFAULT/rabbit_password').with_value('guest').with_secret(true)
|
||||
is_expected.to contain_nova_config('DEFAULT/rabbit_port').with_value('5672')
|
||||
is_expected.to contain_nova_config('DEFAULT/rabbit_userid').with_value('guest')
|
||||
is_expected.to contain_nova_config('DEFAULT/rabbit_virtual_host').with_value('/')
|
||||
is_expected.to contain_nova_config('oslo_messaging_rabbit/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('oslo_messaging_rabbit/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('oslo_messaging_rabbit/rabbit_virtual_host').with_value('/')
|
||||
end
|
||||
|
||||
it 'configures various things' do
|
||||
@ -128,11 +128,11 @@ describe 'nova' do
|
||||
|
||||
it 'configures rabbit' do
|
||||
is_expected.to contain_nova_config('DEFAULT/rpc_backend').with_value('rabbit')
|
||||
is_expected.to contain_nova_config('DEFAULT/rabbit_host').with_value('rabbit')
|
||||
is_expected.to contain_nova_config('DEFAULT/rabbit_password').with_value('password').with_secret(true)
|
||||
is_expected.to contain_nova_config('DEFAULT/rabbit_port').with_value('5673')
|
||||
is_expected.to contain_nova_config('DEFAULT/rabbit_userid').with_value('rabbit_user')
|
||||
is_expected.to contain_nova_config('DEFAULT/rabbit_virtual_host').with_value('/')
|
||||
is_expected.to contain_nova_config('oslo_messaging_rabbit/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('oslo_messaging_rabbit/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('oslo_messaging_rabbit/rabbit_virtual_host').with_value('/')
|
||||
end
|
||||
|
||||
it 'configures memcached_servers' do
|
||||
@ -221,16 +221,16 @@ describe 'nova' do
|
||||
end
|
||||
|
||||
it 'configures rabbit' do
|
||||
is_expected.to_not contain_nova_config('DEFAULT/rabbit_host')
|
||||
is_expected.to_not contain_nova_config('DEFAULT/rabbit_port')
|
||||
is_expected.to contain_nova_config('DEFAULT/rabbit_hosts').with_value('rabbit:5673,rabbit2:5674')
|
||||
is_expected.to contain_nova_config('DEFAULT/rabbit_ha_queues').with_value(true)
|
||||
is_expected.to contain_nova_config('DEFAULT/rabbit_use_ssl').with_value(false)
|
||||
is_expected.to_not contain_nova_config('oslo_messaging_rabbit/rabbit_host')
|
||||
is_expected.to_not contain_nova_config('oslo_messaging_rabbit/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('oslo_messaging_rabbit/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/amqp_durable_queues').with_value(false)
|
||||
is_expected.to contain_nova_config('DEFAULT/kombu_ssl_ca_certs').with_ensure('absent')
|
||||
is_expected.to contain_nova_config('DEFAULT/kombu_ssl_certfile').with_ensure('absent')
|
||||
is_expected.to contain_nova_config('DEFAULT/kombu_ssl_keyfile').with_ensure('absent')
|
||||
is_expected.to contain_nova_config('DEFAULT/kombu_ssl_version').with_ensure('absent')
|
||||
is_expected.to contain_nova_config('oslo_messaging_rabbit/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('oslo_messaging_rabbit/kombu_ssl_keyfile').with_ensure('absent')
|
||||
is_expected.to contain_nova_config('oslo_messaging_rabbit/kombu_ssl_version').with_ensure('absent')
|
||||
end
|
||||
end
|
||||
|
||||
@ -240,11 +240,11 @@ describe 'nova' do
|
||||
end
|
||||
|
||||
it 'configures rabbit' do
|
||||
is_expected.to_not contain_nova_config('DEFAULT/rabbit_host')
|
||||
is_expected.to_not contain_nova_config('DEFAULT/rabbit_port')
|
||||
is_expected.to contain_nova_config('DEFAULT/rabbit_hosts').with_value('rabbit:5673')
|
||||
is_expected.to contain_nova_config('DEFAULT/rabbit_ha_queues').with_value(true)
|
||||
is_expected.to contain_nova_config('DEFAULT/rabbit_use_ssl').with_value(false)
|
||||
is_expected.to_not contain_nova_config('oslo_messaging_rabbit/rabbit_host')
|
||||
is_expected.to_not contain_nova_config('oslo_messaging_rabbit/rabbit_port')
|
||||
is_expected.to contain_nova_config('oslo_messaging_rabbit/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('oslo_messaging_rabbit/rabbit_use_ssl').with_value(false)
|
||||
is_expected.to contain_nova_config('DEFAULT/amqp_durable_queues').with_value(false)
|
||||
end
|
||||
end
|
||||
@ -255,7 +255,7 @@ describe 'nova' do
|
||||
end
|
||||
|
||||
it 'configures rabbit' do
|
||||
is_expected.to contain_nova_config('DEFAULT/rabbit_ha_queues').with_value(true)
|
||||
is_expected.to contain_nova_config('oslo_messaging_rabbit/rabbit_ha_queues').with_value(true)
|
||||
end
|
||||
end
|
||||
|
||||
@ -266,16 +266,16 @@ describe 'nova' do
|
||||
end
|
||||
|
||||
it 'configures rabbit' do
|
||||
is_expected.to_not contain_nova_config('DEFAULT/rabbit_host')
|
||||
is_expected.to_not contain_nova_config('DEFAULT/rabbit_port')
|
||||
is_expected.to contain_nova_config('DEFAULT/rabbit_hosts').with_value('rabbit:5673')
|
||||
is_expected.to contain_nova_config('DEFAULT/rabbit_ha_queues').with_value(true)
|
||||
is_expected.to contain_nova_config('DEFAULT/rabbit_use_ssl').with_value(false)
|
||||
is_expected.to_not contain_nova_config('oslo_messaging_rabbit/rabbit_host')
|
||||
is_expected.to_not contain_nova_config('oslo_messaging_rabbit/rabbit_port')
|
||||
is_expected.to contain_nova_config('oslo_messaging_rabbit/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('oslo_messaging_rabbit/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/kombu_ssl_ca_certs').with_ensure('absent')
|
||||
is_expected.to contain_nova_config('DEFAULT/kombu_ssl_certfile').with_ensure('absent')
|
||||
is_expected.to contain_nova_config('DEFAULT/kombu_ssl_keyfile').with_ensure('absent')
|
||||
is_expected.to contain_nova_config('DEFAULT/kombu_ssl_version').with_ensure('absent')
|
||||
is_expected.to contain_nova_config('oslo_messaging_rabbit/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('oslo_messaging_rabbit/kombu_ssl_keyfile').with_ensure('absent')
|
||||
is_expected.to contain_nova_config('oslo_messaging_rabbit/kombu_ssl_version').with_ensure('absent')
|
||||
end
|
||||
end
|
||||
|
||||
@ -290,11 +290,11 @@ describe 'nova' do
|
||||
end
|
||||
|
||||
it 'configures rabbit' do
|
||||
is_expected.to contain_nova_config('DEFAULT/rabbit_use_ssl').with_value(true)
|
||||
is_expected.to contain_nova_config('DEFAULT/kombu_ssl_ca_certs').with_value('/etc/ca.cert')
|
||||
is_expected.to contain_nova_config('DEFAULT/kombu_ssl_certfile').with_value('/etc/certfile')
|
||||
is_expected.to contain_nova_config('DEFAULT/kombu_ssl_keyfile').with_value('/etc/key')
|
||||
is_expected.to contain_nova_config('DEFAULT/kombu_ssl_version').with_value('TLSv1')
|
||||
is_expected.to contain_nova_config('oslo_messaging_rabbit/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('oslo_messaging_rabbit/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('oslo_messaging_rabbit/kombu_ssl_version').with_value('TLSv1')
|
||||
end
|
||||
end
|
||||
|
||||
@ -305,11 +305,11 @@ describe 'nova' do
|
||||
end
|
||||
|
||||
it 'configures rabbit' do
|
||||
is_expected.to contain_nova_config('DEFAULT/rabbit_use_ssl').with_value(true)
|
||||
is_expected.to contain_nova_config('DEFAULT/kombu_ssl_ca_certs').with_ensure('absent')
|
||||
is_expected.to contain_nova_config('DEFAULT/kombu_ssl_certfile').with_ensure('absent')
|
||||
is_expected.to contain_nova_config('DEFAULT/kombu_ssl_keyfile').with_ensure('absent')
|
||||
is_expected.to contain_nova_config('DEFAULT/kombu_ssl_version').with_value('TLSv1')
|
||||
is_expected.to contain_nova_config('oslo_messaging_rabbit/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('oslo_messaging_rabbit/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('oslo_messaging_rabbit/kombu_ssl_version').with_value('TLSv1')
|
||||
end
|
||||
end
|
||||
|
||||
@ -323,11 +323,11 @@ describe 'nova' do
|
||||
end
|
||||
|
||||
it 'configures rabbit' do
|
||||
is_expected.to contain_nova_config('DEFAULT/rabbit_use_ssl').with_value('false')
|
||||
is_expected.to contain_nova_config('DEFAULT/kombu_ssl_ca_certs').with_ensure('absent')
|
||||
is_expected.to contain_nova_config('DEFAULT/kombu_ssl_certfile').with_ensure('absent')
|
||||
is_expected.to contain_nova_config('DEFAULT/kombu_ssl_keyfile').with_ensure('absent')
|
||||
is_expected.to contain_nova_config('DEFAULT/kombu_ssl_version').with_ensure('absent')
|
||||
is_expected.to contain_nova_config('oslo_messaging_rabbit/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('oslo_messaging_rabbit/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('oslo_messaging_rabbit/kombu_ssl_version').with_ensure('absent')
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user