From 09fb963e4a2594cb478c6c28232b86000aede616 Mon Sep 17 00:00:00 2001 From: Tobias Urdin Date: Mon, 3 Dec 2018 14:03:55 +0100 Subject: [PATCH] Deprecate ZeroMQ ZeroMQ is removed from puppet-oslo [1] and from oslo.messaging so we deprecate the related params in this module. [1] https://review.openstack.org/#/c/621557/ [2] https://review.openstack.org/#/c/596882/ Change-Id: I0240b4694cc16f0b31cafb73ddf0874284668cf5 --- manifests/init.pp | 187 ++++++++---------- .../notes/deprecate-zmq-87517d8c3abef0dd.yaml | 20 ++ spec/classes/watcher_init_spec.rb | 49 ----- 3 files changed, 106 insertions(+), 150 deletions(-) create mode 100644 releasenotes/notes/deprecate-zmq-87517d8c3abef0dd.yaml diff --git a/manifests/init.pp b/manifests/init.pp index 7e297f6..bdd1727 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -202,75 +202,6 @@ # (Optional) Address prefix when sending to any server in group. # Defaults to $::os_service_default # -# [*rpc_cast_timeout*] -# (optional) Seconds to wait before a cast expires (TTL). -# The default value of -1 specifies an infinite linger -# period. The value of 0 specifies no linger period. -# Pending messages shall be discarded immediately -# when the socket is closed. Only supported by impl_zmq. -# Defaults to $::os_service_default. -# -# [*rpc_poll_timeout*] -# (optional) The default number of seconds that poll should wait. -# Poll raises timeout exception when timeout expired. -# Defaults to $::os_service_default. -# -# [*rpc_zmq_bind_address*] -# (optional) ZeroMQ bind address. -# Should be a wildcard (*), an ethernet interface, or IP. -# The "host" option should point or resolve to this address. -# Defaults to $::os_service_default. -# -# [*rpc_zmq_bind_port_retries*] -# (optional) Number of retries to find free port number -# before fail with ZMQBindError. -# Defaults to $::os_service_default. -# -# [*rpc_zmq_concurrency*] -# (optional) Type of concurrency used. -# Either "native" or "eventlet". -# Defaults to $::os_service_default. -# -# [*rpc_zmq_contexts*] -# (optional) Number of ZeroMQ contexts. -# Defaults to $::os_service_default. -# -# [*rpc_zmq_host*] -# (optional) Name of this node. -# Must be a valid hostname, FQDN, or IP address. -# Must match "host" option, if running Nova. -# Defaults to $::os_service_default. -# -# [*rpc_zmq_ipc_dir*] -# (optional) Directory for holding IPC sockets. -# Defaults to $::os_service_default. -# -# [*rpc_zmq_matchmaker*] -# (optional) MatchMaker driver. -# Defaults to $::os_service_default. -# -# [*rpc_zmq_max_port*] -# (optional) Maximal port number for random ports range. -# Defaults to $::os_service_default. -# -# [*rpc_zmq_min_port*] -# (optional) Minimal port number for random ports range. -# Defaults to $::os_service_default. -# -# [*rpc_zmq_topic_backlog*] -# (optional) Maximum number of ingress messages to locally buffer per topic. -# Defaults to $::os_service_default. -# -# [*use_pub_sub*] -# (optional) Use PUB/SUB pattern for fanout methods. -# PUB/SUB always uses proxy. -# Defaults to $::os_service_default. -# -# [*zmq_target_expire*] -# (optional) Expiration timeout in seconds of a name service -# record about existing target ( < 0 means no timeout). -# Defaults to $::os_service_default. -# # [*notification_transport_url*] # (optional) A URL representing the messaging driver to use for notifications # and its full configuration. Transport URLs take the form: @@ -295,6 +226,77 @@ # # Daniel Pawlik # +# === DEPRECATED PARAMETERS +# +# [*rpc_cast_timeout*] +# (optional) Seconds to wait before a cast expires (TTL). +# The default value of -1 specifies an infinite linger +# period. The value of 0 specifies no linger period. +# Pending messages shall be discarded immediately +# when the socket is closed. Only supported by impl_zmq. +# Defaults to undef. +# +# [*rpc_poll_timeout*] +# (optional) The default number of seconds that poll should wait. +# Poll raises timeout exception when timeout expired. +# Defaults to undef. +# +# [*rpc_zmq_bind_address*] +# (optional) ZeroMQ bind address. +# Should be a wildcard (*), an ethernet interface, or IP. +# The "host" option should point or resolve to this address. +# Defaults to undef. +# +# [*rpc_zmq_bind_port_retries*] +# (optional) Number of retries to find free port number +# before fail with ZMQBindError. +# Defaults to undef. +# +# [*rpc_zmq_concurrency*] +# (optional) Type of concurrency used. +# Either "native" or "eventlet". +# Defaults to undef. +# +# [*rpc_zmq_contexts*] +# (optional) Number of ZeroMQ contexts. +# Defaults to undef. +# +# [*rpc_zmq_host*] +# (optional) Name of this node. +# Must be a valid hostname, FQDN, or IP address. +# Must match "host" option, if running Nova. +# Defaults to undef. +# +# [*rpc_zmq_ipc_dir*] +# (optional) Directory for holding IPC sockets. +# Defaults to undef. +# +# [*rpc_zmq_matchmaker*] +# (optional) MatchMaker driver. +# Defaults to undef. +# +# [*rpc_zmq_max_port*] +# (optional) Maximal port number for random ports range. +# Defaults to undef. +# +# [*rpc_zmq_min_port*] +# (optional) Minimal port number for random ports range. +# Defaults to undef. +# +# [*rpc_zmq_topic_backlog*] +# (optional) Maximum number of ingress messages to locally buffer per topic. +# Defaults to undef. +# +# [*use_pub_sub*] +# (optional) Use PUB/SUB pattern for fanout methods. +# PUB/SUB always uses proxy. +# Defaults to undef. +# +# [*zmq_target_expire*] +# (optional) Expiration timeout in seconds of a name service +# record about existing target ( < 0 means no timeout). +# Defaults to undef. +# class watcher ( $purge_config = false, $use_ssl = false, @@ -342,25 +344,25 @@ class watcher ( $amqp_sasl_config_name = $::os_service_default, $amqp_sasl_config_dir = $::os_service_default, $amqp_group_request_prefix = $::os_service_default, - # zmq - $rpc_cast_timeout = $::os_service_default, - $rpc_poll_timeout = $::os_service_default, - $rpc_zmq_bind_address = $::os_service_default, - $rpc_zmq_bind_port_retries = $::os_service_default, - $rpc_zmq_concurrency = $::os_service_default, - $rpc_zmq_contexts = $::os_service_default, - $rpc_zmq_host = $::os_service_default, - $rpc_zmq_ipc_dir = $::os_service_default, - $rpc_zmq_matchmaker = $::os_service_default, - $rpc_zmq_max_port = $::os_service_default, - $rpc_zmq_min_port = $::os_service_default, - $rpc_zmq_topic_backlog = $::os_service_default, - $use_pub_sub = $::os_service_default, - $zmq_target_expire = $::os_service_default, # messaging $notification_transport_url = $::os_service_default, $notification_driver = $::os_service_default, $notification_topics = $::os_service_default, + ## DEPRECATED PARAMS + $rpc_cast_timeout = undef, + $rpc_poll_timeout = undef, + $rpc_zmq_bind_address = undef, + $rpc_zmq_bind_port_retries = undef, + $rpc_zmq_concurrency = undef, + $rpc_zmq_contexts = undef, + $rpc_zmq_host = undef, + $rpc_zmq_ipc_dir = undef, + $rpc_zmq_matchmaker = undef, + $rpc_zmq_max_port = undef, + $rpc_zmq_min_port = undef, + $rpc_zmq_topic_backlog = undef, + $use_pub_sub = undef, + $zmq_target_expire = undef, ) { include ::openstacklib::openstackclient @@ -429,23 +431,6 @@ class watcher ( sasl_config_name => $amqp_sasl_config_name, } - oslo::messaging::zmq { 'watcher_config': - rpc_cast_timeout => $rpc_cast_timeout, - rpc_poll_timeout => $rpc_poll_timeout, - rpc_zmq_bind_address => $rpc_zmq_bind_address, - rpc_zmq_bind_port_retries => $rpc_zmq_bind_port_retries, - rpc_zmq_concurrency => $rpc_zmq_concurrency, - rpc_zmq_contexts => $rpc_zmq_contexts, - rpc_zmq_host => $rpc_zmq_host, - rpc_zmq_ipc_dir => $rpc_zmq_ipc_dir, - rpc_zmq_matchmaker => $rpc_zmq_matchmaker, - rpc_zmq_max_port => $rpc_zmq_max_port, - rpc_zmq_min_port => $rpc_zmq_min_port, - rpc_zmq_topic_backlog => $rpc_zmq_topic_backlog, - use_pub_sub => $use_pub_sub, - zmq_target_expire => $zmq_target_expire, - } - oslo::messaging::default { 'watcher_config': transport_url => $default_transport_url, rpc_response_timeout => $rpc_response_timeout, diff --git a/releasenotes/notes/deprecate-zmq-87517d8c3abef0dd.yaml b/releasenotes/notes/deprecate-zmq-87517d8c3abef0dd.yaml new file mode 100644 index 0000000..bbee3e4 --- /dev/null +++ b/releasenotes/notes/deprecate-zmq-87517d8c3abef0dd.yaml @@ -0,0 +1,20 @@ +--- +deprecations: + - | + The following ZeroMQ related parameters has been deprecated in ::watcher, + has no effect and will be removed in the next release: + + - ``rpc_cast_timeout`` + - ``rpc_poll_timeout`` + - ``rpc_zmq_bind_address`` + - ``rpc_zmq_port_retries`` + - ``rpc_zmq_concurrency`` + - ``rpc_zmq_contexts`` + - ``rpc_zmq_host`` + - ``rpc_zmq_ipc_dir`` + - ``rpc_zmq_matchmaker`` + - ``rpc_zmq_max_port`` + - ``rpc_zmq_min_port`` + - ``rpc_zmq_topic_backlog`` + - ``use_pub_sub`` + - ``zmq_target_expire`` diff --git a/spec/classes/watcher_init_spec.rb b/spec/classes/watcher_init_spec.rb index 36296e4..55b43fd 100644 --- a/spec/classes/watcher_init_spec.rb +++ b/spec/classes/watcher_init_spec.rb @@ -217,55 +217,6 @@ describe 'watcher' do is_expected.to contain_watcher_config('oslo_messaging_amqp/password').with_value('password') end end - - context 'with zmq default parameters' do - it 'configures zmq' do - is_expected.to contain_watcher_config('DEFAULT/rpc_cast_timeout').with_value('') - is_expected.to contain_watcher_config('DEFAULT/rpc_poll_timeout').with_value('') - is_expected.to contain_watcher_config('DEFAULT/rpc_zmq_bind_address').with_value('') - is_expected.to contain_watcher_config('DEFAULT/rpc_zmq_bind_port_retries').with_value('') - is_expected.to contain_watcher_config('DEFAULT/rpc_zmq_concurrency').with_value('') - is_expected.to contain_watcher_config('DEFAULT/rpc_zmq_contexts').with_value('') - is_expected.to contain_watcher_config('DEFAULT/rpc_zmq_host').with_value('') - is_expected.to contain_watcher_config('DEFAULT/rpc_zmq_ipc_dir').with_value('') - is_expected.to contain_watcher_config('DEFAULT/rpc_zmq_matchmaker').with_value('') - is_expected.to contain_watcher_config('DEFAULT/rpc_zmq_max_port').with_value('') - is_expected.to contain_watcher_config('DEFAULT/rpc_zmq_min_port').with_value('') - is_expected.to contain_watcher_config('DEFAULT/rpc_zmq_topic_backlog').with_value('') - is_expected.to contain_watcher_config('DEFAULT/use_pub_sub').with_value('') - is_expected.to contain_watcher_config('DEFAULT/zmq_target_expire').with_value('') - end - end - - context 'with overridden zmq parameters' do - let :params do - { :default_transport_url => 'zmq://zmq_user:password@localhost:5555', - :rpc_zmq_min_port => '49200', - :rpc_zmq_max_port => '65000', - :rpc_zmq_bind_port_retries => '120', - :rpc_zmq_contexts => '2', - :rpc_zmq_host => 'localhost', - } - end - - it 'configures zmq' do - is_expected.to contain_watcher_config('DEFAULT/transport_url').with_value('zmq://zmq_user:password@localhost:5555') - is_expected.to contain_watcher_config('DEFAULT/rpc_cast_timeout').with_value('') - is_expected.to contain_watcher_config('DEFAULT/rpc_poll_timeout').with_value('') - is_expected.to contain_watcher_config('DEFAULT/rpc_zmq_bind_address').with_value('') - is_expected.to contain_watcher_config('DEFAULT/rpc_zmq_bind_port_retries').with_value('120') - is_expected.to contain_watcher_config('DEFAULT/rpc_zmq_concurrency').with_value('') - is_expected.to contain_watcher_config('DEFAULT/rpc_zmq_contexts').with_value('2') - is_expected.to contain_watcher_config('DEFAULT/rpc_zmq_host').with_value('localhost') - is_expected.to contain_watcher_config('DEFAULT/rpc_zmq_ipc_dir').with_value('') - is_expected.to contain_watcher_config('DEFAULT/rpc_zmq_matchmaker').with_value('') - is_expected.to contain_watcher_config('DEFAULT/rpc_zmq_max_port').with_value('65000') - is_expected.to contain_watcher_config('DEFAULT/rpc_zmq_min_port').with_value('49200') - is_expected.to contain_watcher_config('DEFAULT/rpc_zmq_topic_backlog').with_value('') - is_expected.to contain_watcher_config('DEFAULT/use_pub_sub').with_value('') - is_expected.to contain_watcher_config('DEFAULT/zmq_target_expire').with_value('') - end - end end on_supported_os({