Move rabbit/kombu settings to oslo_messaging_rabbit section
Kilo oslo-messaging deprecates rabbit/kombu settings in the DEFAULT section. Move these settings to proper oslo_messaging_rabbit section. Change-Id: Ica8cd70ece41f55b827f74d3f14cbc35f37ae13d
This commit is contained in:
parent
101ca5b088
commit
e6e8f6a562
@ -292,7 +292,7 @@ class glance::api(
|
||||
'DEFAULT/workers': value => $workers;
|
||||
'DEFAULT/show_image_direct_url': value => $show_image_direct_url;
|
||||
'DEFAULT/image_cache_dir': value => $image_cache_dir;
|
||||
'DEFAULT/os_region_name': value => $os_region_name;
|
||||
'glance_store/os_region_name': value => $os_region_name;
|
||||
}
|
||||
|
||||
# known_stores config
|
||||
@ -307,9 +307,9 @@ class glance::api(
|
||||
}
|
||||
|
||||
glance_cache_config {
|
||||
'DEFAULT/verbose': value => $verbose;
|
||||
'DEFAULT/debug': value => $debug;
|
||||
'DEFAULT/os_region_name': value => $os_region_name;
|
||||
'DEFAULT/verbose': value => $verbose;
|
||||
'DEFAULT/debug': value => $debug;
|
||||
'glance_store/os_region_name': value => $os_region_name;
|
||||
}
|
||||
|
||||
# configure api service to connect registry service
|
||||
|
@ -87,55 +87,55 @@ class glance::notify::rabbitmq(
|
||||
|
||||
if $rabbit_hosts {
|
||||
glance_api_config {
|
||||
'DEFAULT/rabbit_hosts': value => join($rabbit_hosts, ',');
|
||||
'DEFAULT/rabbit_ha_queues': value => true
|
||||
'oslo_messaging_rabbit/rabbit_hosts': value => join($rabbit_hosts, ',');
|
||||
'oslo_messaging_rabbit/rabbit_ha_queues': value => true
|
||||
}
|
||||
} else {
|
||||
glance_api_config {
|
||||
'DEFAULT/rabbit_host': value => $rabbit_host;
|
||||
'DEFAULT/rabbit_port': value => $rabbit_port;
|
||||
'DEFAULT/rabbit_hosts': value => "${rabbit_host}:${rabbit_port}";
|
||||
'DEFAULT/rabbit_ha_queues': value => false
|
||||
'oslo_messaging_rabbit/rabbit_host': value => $rabbit_host;
|
||||
'oslo_messaging_rabbit/rabbit_port': value => $rabbit_port;
|
||||
'oslo_messaging_rabbit/rabbit_hosts': value => "${rabbit_host}:${rabbit_port}";
|
||||
'oslo_messaging_rabbit/rabbit_ha_queues': value => false
|
||||
}
|
||||
}
|
||||
|
||||
glance_api_config {
|
||||
'DEFAULT/notification_driver': value => $notification_driver;
|
||||
'DEFAULT/rabbit_virtual_host': value => $rabbit_virtual_host;
|
||||
'DEFAULT/rabbit_password': value => $rabbit_password, secret => true;
|
||||
'DEFAULT/rabbit_userid': value => $rabbit_userid;
|
||||
'DEFAULT/rabbit_notification_exchange': value => $rabbit_notification_exchange;
|
||||
'DEFAULT/rabbit_notification_topic': value => $rabbit_notification_topic;
|
||||
'DEFAULT/rabbit_use_ssl': value => $rabbit_use_ssl;
|
||||
'oslo_messaging_rabbit/rabbit_virtual_host': value => $rabbit_virtual_host;
|
||||
'oslo_messaging_rabbit/rabbit_password': value => $rabbit_password, secret => true;
|
||||
'oslo_messaging_rabbit/rabbit_userid': value => $rabbit_userid;
|
||||
'oslo_messaging_rabbit/rabbit_notification_exchange': value => $rabbit_notification_exchange;
|
||||
'oslo_messaging_rabbit/rabbit_notification_topic': value => $rabbit_notification_topic;
|
||||
'oslo_messaging_rabbit/rabbit_use_ssl': value => $rabbit_use_ssl;
|
||||
'DEFAULT/amqp_durable_queues': value => $amqp_durable_queues_real;
|
||||
}
|
||||
|
||||
if $rabbit_use_ssl {
|
||||
glance_api_config { 'DEFAULT/kombu_ssl_version': value => $kombu_ssl_version }
|
||||
glance_api_config { 'oslo_messaging_rabbit/kombu_ssl_version': value => $kombu_ssl_version }
|
||||
|
||||
if $kombu_ssl_ca_certs {
|
||||
glance_api_config { 'DEFAULT/kombu_ssl_ca_certs': value => $kombu_ssl_ca_certs }
|
||||
glance_api_config { 'oslo_messaging_rabbit/kombu_ssl_ca_certs': value => $kombu_ssl_ca_certs }
|
||||
} else {
|
||||
glance_api_config { 'DEFAULT/kombu_ssl_ca_certs': ensure => absent}
|
||||
glance_api_config { 'oslo_messaging_rabbit/kombu_ssl_ca_certs': ensure => absent}
|
||||
}
|
||||
|
||||
if $kombu_ssl_certfile {
|
||||
glance_api_config { 'DEFAULT/kombu_ssl_certfile': value => $kombu_ssl_certfile }
|
||||
glance_api_config { 'oslo_messaging_rabbit/kombu_ssl_certfile': value => $kombu_ssl_certfile }
|
||||
} else {
|
||||
glance_api_config { 'DEFAULT/kombu_ssl_certfile': ensure => absent}
|
||||
glance_api_config { 'oslo_messaging_rabbit/kombu_ssl_certfile': ensure => absent}
|
||||
}
|
||||
|
||||
if $kombu_ssl_keyfile {
|
||||
glance_api_config { 'DEFAULT/kombu_ssl_keyfile': value => $kombu_ssl_keyfile }
|
||||
glance_api_config { 'oslo_messaging_rabbit/kombu_ssl_keyfile': value => $kombu_ssl_keyfile }
|
||||
} else {
|
||||
glance_api_config { 'DEFAULT/kombu_ssl_keyfile': ensure => absent}
|
||||
glance_api_config { 'oslo_messaging_rabbit/kombu_ssl_keyfile': ensure => absent}
|
||||
}
|
||||
} else {
|
||||
glance_api_config {
|
||||
'DEFAULT/kombu_ssl_version': ensure => absent;
|
||||
'DEFAULT/kombu_ssl_ca_certs': ensure => absent;
|
||||
'DEFAULT/kombu_ssl_certfile': ensure => absent;
|
||||
'DEFAULT/kombu_ssl_keyfile': ensure => absent;
|
||||
'oslo_messaging_rabbit/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;
|
||||
}
|
||||
if ($kombu_ssl_keyfile or $kombu_ssl_certfile or $kombu_ssl_ca_certs) {
|
||||
notice('Configuration of certificates with $rabbit_use_ssl == false is a useless config')
|
||||
|
@ -103,7 +103,6 @@ describe 'glance::api' do
|
||||
'registry_port',
|
||||
'registry_client_protocol',
|
||||
'show_image_direct_url',
|
||||
'os_region_name',
|
||||
].each do |config|
|
||||
is_expected.to contain_glance_api_config("DEFAULT/#{config}").with_value(param_hash[config.intern])
|
||||
end
|
||||
@ -115,12 +114,20 @@ describe 'glance::api' do
|
||||
'debug',
|
||||
'registry_host',
|
||||
'registry_port',
|
||||
'os_region_name',
|
||||
].each do |config|
|
||||
is_expected.to contain_glance_cache_config("DEFAULT/#{config}").with_value(param_hash[config.intern])
|
||||
end
|
||||
end
|
||||
|
||||
it 'is_expected.to lay down default glance_store api and cache config' do
|
||||
[
|
||||
'os_region_name',
|
||||
].each do |config|
|
||||
is_expected.to contain_glance_cache_config("glance_store/#{config}").with_value(param_hash[config.intern])
|
||||
is_expected.to contain_glance_api_config("glance_store/#{config}").with_value(param_hash[config.intern])
|
||||
end
|
||||
end
|
||||
|
||||
it 'is_expected.to config db' do
|
||||
is_expected.to contain_glance_api_config('database/connection').with_value(param_hash[:database_connection])
|
||||
is_expected.to contain_glance_api_config('database/connection').with_value(param_hash[:database_connection]).with_secret(true)
|
||||
|
@ -15,17 +15,17 @@ describe 'glance::notify::rabbitmq' do
|
||||
{:rabbit_password => 'pass'}
|
||||
end
|
||||
it { is_expected.to contain_glance_api_config('DEFAULT/notification_driver').with_value('messaging') }
|
||||
it { is_expected.to contain_glance_api_config('DEFAULT/rabbit_password').with_value('pass') }
|
||||
it { is_expected.to contain_glance_api_config('DEFAULT/rabbit_password').with_value(params[:rabbit_password]).with_secret(true) }
|
||||
it { is_expected.to contain_glance_api_config('DEFAULT/rabbit_userid').with_value('guest') }
|
||||
it { is_expected.to contain_glance_api_config('DEFAULT/rabbit_host').with_value('localhost') }
|
||||
it { is_expected.to contain_glance_api_config('DEFAULT/rabbit_port').with_value('5672') }
|
||||
it { is_expected.to contain_glance_api_config('DEFAULT/rabbit_hosts').with_value('localhost:5672') }
|
||||
it { is_expected.to contain_glance_api_config('DEFAULT/rabbit_ha_queues').with_value('false') }
|
||||
it { is_expected.to contain_glance_api_config('oslo_messaging_rabbit/rabbit_password').with_value('pass') }
|
||||
it { is_expected.to contain_glance_api_config('oslo_messaging_rabbit/rabbit_password').with_value(params[:rabbit_password]).with_secret(true) }
|
||||
it { is_expected.to contain_glance_api_config('oslo_messaging_rabbit/rabbit_userid').with_value('guest') }
|
||||
it { is_expected.to contain_glance_api_config('oslo_messaging_rabbit/rabbit_host').with_value('localhost') }
|
||||
it { is_expected.to contain_glance_api_config('oslo_messaging_rabbit/rabbit_port').with_value('5672') }
|
||||
it { is_expected.to contain_glance_api_config('oslo_messaging_rabbit/rabbit_hosts').with_value('localhost:5672') }
|
||||
it { is_expected.to contain_glance_api_config('oslo_messaging_rabbit/rabbit_ha_queues').with_value('false') }
|
||||
it { is_expected.to contain_glance_api_config('DEFAULT/amqp_durable_queues').with_value('false') }
|
||||
it { is_expected.to contain_glance_api_config('DEFAULT/rabbit_virtual_host').with_value('/') }
|
||||
it { is_expected.to contain_glance_api_config('DEFAULT/rabbit_notification_exchange').with_value('glance') }
|
||||
it { is_expected.to contain_glance_api_config('DEFAULT/rabbit_notification_topic').with_value('notifications') }
|
||||
it { is_expected.to contain_glance_api_config('oslo_messaging_rabbit/rabbit_virtual_host').with_value('/') }
|
||||
it { is_expected.to contain_glance_api_config('oslo_messaging_rabbit/rabbit_notification_exchange').with_value('glance') }
|
||||
it { is_expected.to contain_glance_api_config('oslo_messaging_rabbit/rabbit_notification_topic').with_value('notifications') }
|
||||
end
|
||||
|
||||
describe 'when passing params and use ssl' do
|
||||
@ -38,15 +38,15 @@ describe 'glance::notify::rabbitmq' do
|
||||
:rabbit_use_ssl => true,
|
||||
:rabbit_durable_queues => true,
|
||||
}
|
||||
it { is_expected.to contain_glance_api_config('DEFAULT/rabbit_userid').with_value('guest2') }
|
||||
it { is_expected.to contain_glance_api_config('DEFAULT/rabbit_host').with_value('localhost2') }
|
||||
it { is_expected.to contain_glance_api_config('DEFAULT/rabbit_port').with_value('5673') }
|
||||
it { is_expected.to contain_glance_api_config('DEFAULT/rabbit_use_ssl').with_value('true') }
|
||||
it { is_expected.to contain_glance_api_config('DEFAULT/kombu_ssl_ca_certs').with_ensure('absent') }
|
||||
it { is_expected.to contain_glance_api_config('DEFAULT/kombu_ssl_certfile').with_ensure('absent') }
|
||||
it { is_expected.to contain_glance_api_config('DEFAULT/kombu_ssl_keyfile').with_ensure('absent') }
|
||||
it { is_expected.to contain_glance_api_config('DEFAULT/kombu_ssl_version').with_value('TLSv1') }
|
||||
it { is_expected.to contain_glance_api_config('DEFAULT/rabbit_durable_queues').with_value('true') }
|
||||
it { is_expected.to contain_glance_api_config('oslo_messaging_rabbit/rabbit_userid').with_value('guest2') }
|
||||
it { is_expected.to contain_glance_api_config('oslo_messaging_rabbit/rabbit_host').with_value('localhost2') }
|
||||
it { is_expected.to contain_glance_api_config('oslo_messaging_rabbit/rabbit_port').with_value('5673') }
|
||||
it { is_expected.to contain_glance_api_config('oslo_messaging_rabbit/rabbit_use_ssl').with_value('true') }
|
||||
it { is_expected.to contain_glance_api_config('oslo_messaging_rabbit/kombu_ssl_ca_certs').with_ensure('absent') }
|
||||
it { is_expected.to contain_glance_api_config('oslo_messaging_rabbit/kombu_ssl_certfile').with_ensure('absent') }
|
||||
it { is_expected.to contain_glance_api_config('oslo_messaging_rabbit/kombu_ssl_keyfile').with_ensure('absent') }
|
||||
it { is_expected.to contain_glance_api_config('oslo_messaging_rabbit/kombu_ssl_version').with_value('TLSv1') }
|
||||
it { is_expected.to contain_glance_api_config('oslo_messaging_rabbit/rabbit_durable_queues').with_value('true') }
|
||||
end
|
||||
end
|
||||
|
||||
@ -61,11 +61,11 @@ describe 'glance::notify::rabbitmq' do
|
||||
:kombu_ssl_version => 'TLSv1',
|
||||
}
|
||||
end
|
||||
it { is_expected.to contain_glance_api_config('DEFAULT/rabbit_use_ssl').with_value(true) }
|
||||
it { is_expected.to contain_glance_api_config('DEFAULT/kombu_ssl_ca_certs').with_value('/etc/ca.cert') }
|
||||
it { is_expected.to contain_glance_api_config('DEFAULT/kombu_ssl_certfile').with_value('/etc/certfile') }
|
||||
it { is_expected.to contain_glance_api_config('DEFAULT/kombu_ssl_keyfile').with_value('/etc/key') }
|
||||
it { is_expected.to contain_glance_api_config('DEFAULT/kombu_ssl_version').with_value('TLSv1') }
|
||||
it { is_expected.to contain_glance_api_config('oslo_messaging_rabbit/rabbit_use_ssl').with_value(true) }
|
||||
it { is_expected.to contain_glance_api_config('oslo_messaging_rabbit/kombu_ssl_ca_certs').with_value('/etc/ca.cert') }
|
||||
it { is_expected.to contain_glance_api_config('oslo_messaging_rabbit/kombu_ssl_certfile').with_value('/etc/certfile') }
|
||||
it { is_expected.to contain_glance_api_config('oslo_messaging_rabbit/kombu_ssl_keyfile').with_value('/etc/key') }
|
||||
it { is_expected.to contain_glance_api_config('oslo_messaging_rabbit/kombu_ssl_version').with_value('TLSv1') }
|
||||
end
|
||||
|
||||
describe 'with rabbit ssl disabled' do
|
||||
@ -80,11 +80,11 @@ describe 'glance::notify::rabbitmq' do
|
||||
}
|
||||
end
|
||||
|
||||
it { is_expected.to contain_glance_api_config('DEFAULT/rabbit_use_ssl').with_value('false') }
|
||||
it { is_expected.to contain_glance_api_config('DEFAULT/kombu_ssl_ca_certs').with_ensure('absent') }
|
||||
it { is_expected.to contain_glance_api_config('DEFAULT/kombu_ssl_certfile').with_ensure('absent') }
|
||||
it { is_expected.to contain_glance_api_config('DEFAULT/kombu_ssl_keyfile').with_ensure('absent') }
|
||||
it { is_expected.to contain_glance_api_config('DEFAULT/kombu_ssl_version').with_ensure('absent') }
|
||||
it { is_expected.to contain_glance_api_config('oslo_messaging_rabbit/rabbit_use_ssl').with_value('false') }
|
||||
it { is_expected.to contain_glance_api_config('oslo_messaging_rabbit/kombu_ssl_ca_certs').with_ensure('absent') }
|
||||
it { is_expected.to contain_glance_api_config('oslo_messaging_rabbit/kombu_ssl_certfile').with_ensure('absent') }
|
||||
it { is_expected.to contain_glance_api_config('oslo_messaging_rabbit/kombu_ssl_keyfile').with_ensure('absent') }
|
||||
it { is_expected.to contain_glance_api_config('oslo_messaging_rabbit/kombu_ssl_version').with_ensure('absent') }
|
||||
end
|
||||
|
||||
describe 'when passing params for single rabbit host' do
|
||||
@ -98,11 +98,11 @@ describe 'glance::notify::rabbitmq' do
|
||||
:rabbit_durable_queues => true,
|
||||
}
|
||||
end
|
||||
it { is_expected.to contain_glance_api_config('DEFAULT/rabbit_userid').with_value('guest2') }
|
||||
it { is_expected.to contain_glance_api_config('DEFAULT/rabbit_host').with_value('localhost2') }
|
||||
it { is_expected.to contain_glance_api_config('DEFAULT/rabbit_port').with_value('5673') }
|
||||
it { is_expected.to contain_glance_api_config('DEFAULT/rabbit_hosts').with_value('localhost2:5673') }
|
||||
it { is_expected.to contain_glance_api_config('DEFAULT/rabbit_use_ssl').with_value('true') }
|
||||
it { is_expected.to contain_glance_api_config('oslo_messaging_rabbit/rabbit_userid').with_value('guest2') }
|
||||
it { is_expected.to contain_glance_api_config('oslo_messaging_rabbit/rabbit_host').with_value('localhost2') }
|
||||
it { is_expected.to contain_glance_api_config('oslo_messaging_rabbit/rabbit_port').with_value('5673') }
|
||||
it { is_expected.to contain_glance_api_config('oslo_messaging_rabbit/rabbit_hosts').with_value('localhost2:5673') }
|
||||
it { is_expected.to contain_glance_api_config('oslo_messaging_rabbit/rabbit_use_ssl').with_value('true') }
|
||||
it { is_expected.to contain_glance_api_config('DEFAULT/amqp_durable_queues').with_value('true') }
|
||||
end
|
||||
|
||||
@ -114,12 +114,12 @@ describe 'glance::notify::rabbitmq' do
|
||||
:rabbit_hosts => ['nonlocalhost3:5673', 'nonlocalhost4:5673']
|
||||
}
|
||||
end
|
||||
it { is_expected.to contain_glance_api_config('DEFAULT/rabbit_userid').with_value('guest3') }
|
||||
it { is_expected.to contain_glance_api_config('DEFAULT/rabbit_hosts').with_value(
|
||||
it { is_expected.to contain_glance_api_config('oslo_messaging_rabbit/rabbit_userid').with_value('guest3') }
|
||||
it { is_expected.to contain_glance_api_config('oslo_messaging_rabbit/rabbit_hosts').with_value(
|
||||
'nonlocalhost3:5673,nonlocalhost4:5673') }
|
||||
it { is_expected.to contain_glance_api_config('DEFAULT/rabbit_ha_queues').with_value('true') }
|
||||
it { is_expected.to_not contain_glance_api_config('DEFAULT/rabbit_port') }
|
||||
it { is_expected.to_not contain_glance_api_config('DEFAULT/rabbit_host') }
|
||||
it { is_expected.to contain_glance_api_config('oslo_messaging_rabbit/rabbit_ha_queues').with_value('true') }
|
||||
it { is_expected.to_not contain_glance_api_config('oslo_messaging_rabbit/rabbit_port') }
|
||||
it { is_expected.to_not contain_glance_api_config('oslo_messaging_rabbit/rabbit_host') }
|
||||
end
|
||||
|
||||
describe 'when using deprecated params' do
|
||||
|
Loading…
Reference in New Issue
Block a user