Deprecate ZeroMQ
ZeroMQ is removed from oslo.messaging [1] so we can remove all the behavior and just keep the interface until the next release. [1] https://review.openstack.org/#/c/596882/ Change-Id: I8edda9d72ed0256f8d6b5fd7a0c2fc8c297da448
This commit is contained in:
parent
4554eb9570
commit
c5eb7e5a47
|
@ -1,5 +1,7 @@
|
||||||
# == Define: oslo::messaging::zmq
|
# == Define: oslo::messaging::zmq
|
||||||
#
|
#
|
||||||
|
# DEPRECATED!
|
||||||
|
#
|
||||||
# Configure ZeroMQ messaging options
|
# Configure ZeroMQ messaging options
|
||||||
#
|
#
|
||||||
# This resource configures ZeroMQ messaging resources for an OpenStack service.
|
# This resource configures ZeroMQ messaging resources for an OpenStack service.
|
||||||
|
@ -93,26 +95,5 @@ define oslo::messaging::zmq(
|
||||||
$zmq_target_expire = $::os_service_default,
|
$zmq_target_expire = $::os_service_default,
|
||||||
) {
|
) {
|
||||||
|
|
||||||
if ! ( is_service_default($rpc_zmq_concurrency) or $rpc_zmq_concurrency in [ 'eventlet', 'native' ] ) {
|
warning('oslo::messaging::zmq is deprecated and has no effect since zeromq support in oslo.messaging is removed')
|
||||||
fail('Unsupported type of zmq concurrency is used.')
|
|
||||||
}
|
|
||||||
|
|
||||||
$zmq_options = {
|
|
||||||
'DEFAULT/rpc_cast_timeout' => { value => $rpc_cast_timeout },
|
|
||||||
'DEFAULT/rpc_poll_timeout' => { value => $rpc_poll_timeout },
|
|
||||||
'DEFAULT/rpc_zmq_bind_address' => { value => $rpc_zmq_bind_address },
|
|
||||||
'DEFAULT/rpc_zmq_bind_port_retries' => { value => $rpc_zmq_bind_port_retries },
|
|
||||||
'DEFAULT/rpc_zmq_concurrency' => { value => $rpc_zmq_concurrency },
|
|
||||||
'DEFAULT/rpc_zmq_contexts' => { value => $rpc_zmq_contexts },
|
|
||||||
'DEFAULT/rpc_zmq_host' => { value => $rpc_zmq_host },
|
|
||||||
'DEFAULT/rpc_zmq_ipc_dir' => { value => $rpc_zmq_ipc_dir },
|
|
||||||
'DEFAULT/rpc_zmq_matchmaker' => { value => $rpc_zmq_matchmaker },
|
|
||||||
'DEFAULT/rpc_zmq_max_port' => { value => $rpc_zmq_max_port },
|
|
||||||
'DEFAULT/rpc_zmq_min_port' => { value => $rpc_zmq_min_port },
|
|
||||||
'DEFAULT/rpc_zmq_topic_backlog' => { value => $rpc_zmq_topic_backlog },
|
|
||||||
'DEFAULT/use_pub_sub' => { value => $use_pub_sub },
|
|
||||||
'DEFAULT/zmq_target_expire' => { value => $zmq_target_expire },
|
|
||||||
}
|
|
||||||
|
|
||||||
create_resources($name, $zmq_options)
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
---
|
||||||
|
upgrade:
|
||||||
|
- |
|
||||||
|
The oslo::messaging::zeromq class has no effect so you much use another
|
||||||
|
messaging provider such as rabbitmq.
|
||||||
|
deprecations:
|
||||||
|
- |
|
||||||
|
The oslo::messaging::zeromq class is deprecated and has no effect.
|
|
@ -1,66 +0,0 @@
|
||||||
require 'spec_helper'
|
|
||||||
|
|
||||||
describe 'oslo::messaging::zmq' do
|
|
||||||
|
|
||||||
let (:title) { 'keystone_config' }
|
|
||||||
|
|
||||||
shared_examples 'oslo-messaging-zmq' do
|
|
||||||
|
|
||||||
context 'with default parameters' do
|
|
||||||
it 'configure zmq default params' do
|
|
||||||
is_expected.to contain_keystone_config('DEFAULT/rpc_cast_timeout').with_value('<SERVICE DEFAULT>')
|
|
||||||
is_expected.to contain_keystone_config('DEFAULT/rpc_poll_timeout').with_value('<SERVICE DEFAULT>')
|
|
||||||
is_expected.to contain_keystone_config('DEFAULT/rpc_zmq_bind_address').with_value('<SERVICE DEFAULT>')
|
|
||||||
is_expected.to contain_keystone_config('DEFAULT/rpc_zmq_bind_port_retries').with_value('<SERVICE DEFAULT>')
|
|
||||||
is_expected.to contain_keystone_config('DEFAULT/rpc_zmq_concurrency').with_value('<SERVICE DEFAULT>')
|
|
||||||
is_expected.to contain_keystone_config('DEFAULT/rpc_zmq_contexts').with_value('<SERVICE DEFAULT>')
|
|
||||||
is_expected.to contain_keystone_config('DEFAULT/rpc_zmq_host').with_value('<SERVICE DEFAULT>')
|
|
||||||
is_expected.to contain_keystone_config('DEFAULT/rpc_zmq_ipc_dir').with_value('<SERVICE DEFAULT>')
|
|
||||||
is_expected.to contain_keystone_config('DEFAULT/rpc_zmq_matchmaker').with_value('<SERVICE DEFAULT>')
|
|
||||||
is_expected.to contain_keystone_config('DEFAULT/rpc_zmq_max_port').with_value('<SERVICE DEFAULT>')
|
|
||||||
is_expected.to contain_keystone_config('DEFAULT/rpc_zmq_min_port').with_value('<SERVICE DEFAULT>')
|
|
||||||
is_expected.to contain_keystone_config('DEFAULT/rpc_zmq_topic_backlog').with_value('<SERVICE DEFAULT>')
|
|
||||||
is_expected.to contain_keystone_config('DEFAULT/use_pub_sub').with_value('<SERVICE DEFAULT>')
|
|
||||||
is_expected.to contain_keystone_config('DEFAULT/zmq_target_expire').with_value('<SERVICE DEFAULT>')
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
||||||
|
|
||||||
context 'with overridden parameters' do
|
|
||||||
let :params do
|
|
||||||
{ :rpc_zmq_bind_address => '0.0.0.0',
|
|
||||||
:rpc_zmq_bind_port_retries => '10',
|
|
||||||
:rpc_zmq_concurrency => 'native',
|
|
||||||
:rpc_zmq_contexts => '2',
|
|
||||||
}
|
|
||||||
end
|
|
||||||
|
|
||||||
it 'configure zmq with overridden values' do
|
|
||||||
is_expected.to contain_keystone_config('DEFAULT/rpc_zmq_bind_address').with_value('0.0.0.0')
|
|
||||||
is_expected.to contain_keystone_config('DEFAULT/rpc_zmq_bind_port_retries').with_value('10')
|
|
||||||
is_expected.to contain_keystone_config('DEFAULT/rpc_zmq_concurrency').with_value('native')
|
|
||||||
is_expected.to contain_keystone_config('DEFAULT/rpc_zmq_contexts').with_value('2')
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
context 'with wrong zmq concurrency' do
|
|
||||||
let :params do
|
|
||||||
{ :rpc_zmq_concurrency => 'some_another' }
|
|
||||||
end
|
|
||||||
|
|
||||||
it_raises 'a Puppet::Error', /Unsupported type of zmq concurrency is used/
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
on_supported_os({
|
|
||||||
:supported_os => OSDefaults.get_supported_os
|
|
||||||
}).each do |os,facts|
|
|
||||||
context "on #{os}" do
|
|
||||||
let (:facts) do
|
|
||||||
facts.merge!(OSDefaults.get_facts())
|
|
||||||
end
|
|
||||||
|
|
||||||
it_behaves_like 'oslo-messaging-zmq'
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
Loading…
Reference in New Issue