Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-oslo.messaging for
openSUSE:Factory checked in at 2022-05-25 20:34:43
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-oslo.messaging (Old)
and /work/SRC/openSUSE:Factory/.python-oslo.messaging.new.2254 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-oslo.messaging"
Wed May 25 20:34:43 2022 rev:26 rq:979087 version:12.14.0
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-oslo.messaging/python-oslo.messaging.changes
2021-12-12 00:57:38.354585601 +0100
+++
/work/SRC/openSUSE:Factory/.python-oslo.messaging.new.2254/python-oslo.messaging.changes
2022-05-25 20:35:12.572281839 +0200
@@ -1,0 +2,21 @@
+Tue May 24 21:39:26 UTC 2022 - [email protected]
+
+- update to version 12.14.0
+ - limit maximum timeout in the poll loop
+ - Adding support for rabbitmq quorum queues
+ - Update master for stable/yoga
+ - Add EXTERNAL as rabbit login method
+ - Add a new option to enforce the OpenSSL FIPS mode
+ - Update python testing classifier
+ - tests: Fix test failures with kombu >= 5.2.4
+ - rabbit: move stdlib_threading bits into _utils
+ - Remove deprecation of heartbeat_in_pthread
+ - amqp1: fix race when reconnecting
+ - [rabbit] use retry parameters during notification sending
+ - use message id cache for RPC listener
+ - Update master for stable/xena
+ - Reproduce bug 1917645
+ - Add Python3 yoga unit tests
+ - Add Python3 zed unit tests
+
+-------------------------------------------------------------------
Old:
----
oslo.messaging-12.9.1.tar.gz
New:
----
oslo.messaging-12.14.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-oslo.messaging.spec ++++++
--- /var/tmp/diff_new_pack.9M9AOI/_old 2022-05-25 20:35:13.112282592 +0200
+++ /var/tmp/diff_new_pack.9M9AOI/_new 2022-05-25 20:35:13.116282598 +0200
@@ -1,7 +1,7 @@
#
# spec file for package python-oslo.messaging
#
-# Copyright (c) 2021 SUSE LLC
+# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,13 +17,13 @@
Name: python-oslo.messaging
-Version: 12.9.1
+Version: 12.14.0
Release: 0
Summary: OpenStack oslo.messaging library
License: Apache-2.0
Group: Development/Languages/Python
URL: https://docs.openstack.org/oslo.messaging
-Source0:
https://files.pythonhosted.org/packages/source/o/oslo.messaging/oslo.messaging-12.9.1.tar.gz
+Source0:
https://files.pythonhosted.org/packages/source/o/oslo.messaging/oslo.messaging-12.14.0.tar.gz
BuildRequires: openstack-macros
BuildRequires: python3-PyYAML >= 3.13
BuildRequires: python3-WebOb >= 1.7.1
@@ -36,7 +36,6 @@
BuildRequires: python3-futurist >= 1.2.0
BuildRequires: python3-greenlet
BuildRequires: python3-kombu >= 4.6.6
-BuildRequires: python3-mock
BuildRequires: python3-monotonic
BuildRequires: python3-oslo.config >= 5.2.0
BuildRequires: python3-oslo.i18n
@@ -49,7 +48,6 @@
BuildRequires: python3-oslotest
BuildRequires: python3-pbr >= 2.0.0
BuildRequires: python3-pyngus
-BuildRequires: python3-six
BuildRequires: python3-stestr
BuildRequires: python3-stevedore >= 1.20.0
BuildRequires: python3-testscenarios
@@ -78,7 +76,6 @@
Requires: python3-oslo.serialization >= 2.18.0
Requires: python3-oslo.service >= 1.24.0
Requires: python3-oslo.utils >= 3.37.0
-Requires: python3-six
Requires: python3-stevedore >= 1.20.0
%if 0%{?suse_version}
Obsoletes: python2-oslo.messaging < 12.0.0
@@ -101,7 +98,7 @@
This package contains the documentation.
%prep
-%autosetup -p1 -n oslo.messaging-12.9.1
+%autosetup -p1 -n oslo.messaging-12.14.0
%py_req_cleanup
%build
++++++ oslo.messaging-12.9.1.tar.gz -> oslo.messaging-12.14.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/oslo.messaging-12.9.1/.zuul.yaml
new/oslo.messaging-12.14.0/.zuul.yaml
--- old/oslo.messaging-12.9.1/.zuul.yaml 2021-08-26 17:39:33.000000000
+0200
+++ new/oslo.messaging-12.14.0/.zuul.yaml 2022-05-12 12:25:30.000000000
+0200
@@ -108,7 +108,7 @@
- check-requirements
- lib-forward-testing-python3
- openstack-cover-jobs
- - openstack-python3-xena-jobs
+ - openstack-python3-zed-jobs
- periodic-stable-jobs
- publish-openstack-docs-pti
- release-notes-jobs-python3
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/oslo.messaging-12.9.1/AUTHORS
new/oslo.messaging-12.14.0/AUTHORS
--- old/oslo.messaging-12.9.1/AUTHORS 2021-08-26 17:40:14.000000000 +0200
+++ new/oslo.messaging-12.14.0/AUTHORS 2022-05-12 12:26:02.000000000 +0200
@@ -139,6 +139,7 @@
Nguyen Hung Phuong <[email protected]>
Nicolas Simonds <[email protected]>
Nikhil Manchanda <[email protected]>
+Nikita Kalyanov <[email protected]>
Nikola Dipanov <[email protected]>
Numan Siddique <[email protected]>
Oleg Bondarev <[email protected]>
@@ -210,6 +211,7 @@
gord chung <[email protected]>
gordon chung <[email protected]>
gtt116 <[email protected]>
+hamza alqtaishat <[email protected]>
howardlee <[email protected]>
hussainchachuliya <[email protected]>
jacky06 <[email protected]>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/oslo.messaging-12.9.1/ChangeLog
new/oslo.messaging-12.14.0/ChangeLog
--- old/oslo.messaging-12.9.1/ChangeLog 2021-08-26 17:40:13.000000000 +0200
+++ new/oslo.messaging-12.14.0/ChangeLog 2022-05-12 12:26:02.000000000
+0200
@@ -1,6 +1,45 @@
CHANGES
=======
+12.14.0
+-------
+
+* Add EXTERNAL as rabbit login method
+* tests: Fix test failures with kombu >= 5.2.4
+* Add Python3 zed unit tests
+* Update master for stable/yoga
+
+12.13.0
+-------
+
+* Adding support for rabbitmq quorum queues
+
+12.12.0
+-------
+
+* [rabbit] use retry parameters during notification sending
+* Update python testing classifier
+* Reproduce bug 1917645
+
+12.11.1
+-------
+
+* amqp1: fix race when reconnecting
+* Add a new option to enforce the OpenSSL FIPS mode
+
+12.11.0
+-------
+
+* Remove deprecation of heartbeat\_in\_pthread
+
+12.10.0
+-------
+
+* rabbit: move stdlib\_threading bits into \_utils
+* Add Python3 yoga unit tests
+* Update master for stable/xena
+* use message id cache for RPC listener
+
12.9.1
------
@@ -11,6 +50,7 @@
12.9.0
------
+* limit maximum timeout in the poll loop
* Add Support For oslo.metrics
* Changed minversion in tox to 3.18.0
* Upgrade the pre-commit-hooks version
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/oslo.messaging-12.9.1/PKG-INFO
new/oslo.messaging-12.14.0/PKG-INFO
--- old/oslo.messaging-12.9.1/PKG-INFO 2021-08-26 17:40:14.162091500 +0200
+++ new/oslo.messaging-12.14.0/PKG-INFO 2022-05-12 12:26:02.899510000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: oslo.messaging
-Version: 12.9.1
+Version: 12.14.0
Summary: Oslo Messaging API
Home-page: https://docs.openstack.org/oslo.messaging/latest/
Author: OpenStack
@@ -47,6 +47,7 @@
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
+Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: Implementation :: CPython
Requires-Python: >=3.6
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/oslo.messaging-12.9.1/doc/source/admin/rabbit.rst
new/oslo.messaging-12.14.0/doc/source/admin/rabbit.rst
--- old/oslo.messaging-12.9.1/doc/source/admin/rabbit.rst 2021-08-26
17:39:33.000000000 +0200
+++ new/oslo.messaging-12.14.0/doc/source/admin/rabbit.rst 2022-05-12
12:25:30.000000000 +0200
@@ -240,6 +240,7 @@
^^^^^^^^^^^^^^^^^
- :oslo.config:option:`oslo_messaging_rabbit.rabbit_ha_queues`
+- :oslo.config:option:`oslo_messaging_rabbit.rabbit_quorum_queue`
- :oslo.config:option:`oslo_messaging_rabbit.rabbit_transient_queues_ttl`
Connection Options
@@ -266,3 +267,4 @@
- :oslo.config:option:`oslo_messaging_rabbit.ssl_key_file`
- :oslo.config:option:`oslo_messaging_rabbit.ssl_cert_file`
- :oslo.config:option:`oslo_messaging_rabbit.rabbit_login_method`
+- :oslo.config:option:`oslo_messaging_rabbit.ssl_enforce_fips_mode`
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/oslo.messaging-12.9.1/oslo.messaging.egg-info/PKG-INFO
new/oslo.messaging-12.14.0/oslo.messaging.egg-info/PKG-INFO
--- old/oslo.messaging-12.9.1/oslo.messaging.egg-info/PKG-INFO 2021-08-26
17:40:14.000000000 +0200
+++ new/oslo.messaging-12.14.0/oslo.messaging.egg-info/PKG-INFO 2022-05-12
12:26:02.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: oslo.messaging
-Version: 12.9.1
+Version: 12.14.0
Summary: Oslo Messaging API
Home-page: https://docs.openstack.org/oslo.messaging/latest/
Author: OpenStack
@@ -47,6 +47,7 @@
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
+Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: Implementation :: CPython
Requires-Python: >=3.6
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/oslo.messaging-12.9.1/oslo.messaging.egg-info/SOURCES.txt
new/oslo.messaging-12.14.0/oslo.messaging.egg-info/SOURCES.txt
--- old/oslo.messaging-12.9.1/oslo.messaging.egg-info/SOURCES.txt
2021-08-26 17:40:14.000000000 +0200
+++ new/oslo.messaging-12.14.0/oslo.messaging.egg-info/SOURCES.txt
2022-05-12 12:26:02.000000000 +0200
@@ -142,13 +142,16 @@
releasenotes/notes/add-ping-endpoint.yaml
releasenotes/notes/add-ssl-support-for-kafka.yaml
releasenotes/notes/add_reno-3b4ae0789e9c45b4.yaml
+releasenotes/notes/adding_support_for_quorum_queues-3101d055b492289e.yaml
releasenotes/notes/blocking-executor-deprecated-895146c1c3bf2f51.yaml
releasenotes/notes/blocking-executor-support-dropped-a3bc74c6825863f0.yaml
+releasenotes/notes/bug-1917645-rabbit-use-retry-parameter-for-notifications-3f7c508ab4437579.yaml
releasenotes/notes/bump-amqp-version-due-to-tls-issue-e877b152eb101c15.yaml
releasenotes/notes/connection_ttl-2cf0fe6e1ab8c73c.yaml
releasenotes/notes/deprecate-ZeroMQ-driver-a8af25aaba867c5b.yaml
releasenotes/notes/disable-mandatory-flag-a6210a534f3853f0.yaml
releasenotes/notes/drop-python27-support-5ef2f365d8930483.yaml
+releasenotes/notes/enforce_fips_mode-07dd259eb8a73c2b.yaml
releasenotes/notes/fix-access_policy-deafult-a6954a147cb002b0.yaml
releasenotes/notes/get_rpc_transport-4aa3511ad9754a60.yaml
releasenotes/notes/handle-missing-queue-553a803f94976be7.yaml
@@ -164,6 +167,7 @@
releasenotes/notes/remove-pika-1bae204ced2521a3.yaml
releasenotes/notes/retry-support-07996ef04dda9482.yaml
releasenotes/notes/run-heartbeat-in-pthread-by-default-28637b41ebf500dc.yaml
+releasenotes/notes/undeprecate_heartbeat_in_pthread-48e2c1fc008cf208.yaml
releasenotes/notes/use-extras-for-optional-deps-2a00e8007ef7a629.yaml
releasenotes/source/conf.py
releasenotes/source/index.rst
@@ -178,6 +182,8 @@
releasenotes/source/ussuri.rst
releasenotes/source/victoria.rst
releasenotes/source/wallaby.rst
+releasenotes/source/xena.rst
+releasenotes/source/yoga.rst
releasenotes/source/_static/.placeholder
releasenotes/source/_templates/.placeholder
releasenotes/source/locale/en_GB/LC_MESSAGES/releasenotes.po
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/oslo.messaging-12.9.1/oslo.messaging.egg-info/pbr.json
new/oslo.messaging-12.14.0/oslo.messaging.egg-info/pbr.json
--- old/oslo.messaging-12.9.1/oslo.messaging.egg-info/pbr.json 2021-08-26
17:40:14.000000000 +0200
+++ new/oslo.messaging-12.14.0/oslo.messaging.egg-info/pbr.json 2022-05-12
12:26:02.000000000 +0200
@@ -1 +1 @@
-{"git_version": "f9de265f", "is_release": true}
\ No newline at end of file
+{"git_version": "ca498b61", "is_release": true}
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/oslo.messaging-12.9.1/oslo_messaging/_drivers/amqp.py
new/oslo.messaging-12.14.0/oslo_messaging/_drivers/amqp.py
--- old/oslo.messaging-12.9.1/oslo_messaging/_drivers/amqp.py 2021-08-26
17:39:33.000000000 +0200
+++ new/oslo.messaging-12.14.0/oslo_messaging/_drivers/amqp.py 2022-05-12
12:25:30.000000000 +0200
@@ -32,7 +32,9 @@
amqp_opts = [
cfg.BoolOpt('amqp_durable_queues',
default=False,
- help='Use durable queues in AMQP.'),
+ help='Use durable queues in AMQP. If rabbit_quorum_queue '
+ 'is enabled, queues will be durable and this value will '
+ 'be ignored.'),
cfg.BoolOpt('amqp_auto_delete',
default=False,
deprecated_group='DEFAULT',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/oslo.messaging-12.9.1/oslo_messaging/_drivers/amqp1_driver/controller.py
new/oslo.messaging-12.14.0/oslo_messaging/_drivers/amqp1_driver/controller.py
---
old/oslo.messaging-12.9.1/oslo_messaging/_drivers/amqp1_driver/controller.py
2021-08-26 17:39:33.000000000 +0200
+++
new/oslo.messaging-12.14.0/oslo_messaging/_drivers/amqp1_driver/controller.py
2022-05-12 12:25:30.000000000 +0200
@@ -1245,6 +1245,7 @@
# service. Try to re-establish the connection:
if not self._reconnecting:
self._reconnecting = True
+ self.processor.wakeup(lambda: self._hard_reset(reason))
LOG.info("Delaying reconnect attempt for %d seconds",
self._delay)
self.processor.defer(lambda: self._do_reconnect(reason),
@@ -1261,7 +1262,6 @@
"""
self._reconnecting = False
if not self._closing:
- self._hard_reset(reason)
host = self.hosts.next()
LOG.info("Reconnecting to: %(hostname)s:%(port)s",
{'hostname': host.hostname, 'port': host.port})
@@ -1331,4 +1331,5 @@
def _active(self):
# Is the connection up
return (self._socket_connection and
+ self._socket_connection.pyngus_conn and
self._socket_connection.pyngus_conn.active)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/oslo.messaging-12.9.1/oslo_messaging/_drivers/amqpdriver.py
new/oslo.messaging-12.14.0/oslo_messaging/_drivers/amqpdriver.py
--- old/oslo.messaging-12.9.1/oslo_messaging/_drivers/amqpdriver.py
2021-08-26 17:39:33.000000000 +0200
+++ new/oslo.messaging-12.14.0/oslo_messaging/_drivers/amqpdriver.py
2022-05-12 12:25:30.000000000 +0200
@@ -292,6 +292,7 @@
class AMQPListener(base.PollStyleListener):
+ use_cache = False
def __init__(self, driver, conn):
super(AMQPListener, self).__init__(driver.prefetch_size)
@@ -308,7 +309,13 @@
def __call__(self, message):
ctxt = rpc_amqp.unpack_context(message)
- unique_id = self.msg_id_cache.check_duplicate_message(message)
+ try:
+ unique_id = self.msg_id_cache.check_duplicate_message(message)
+ except rpc_common.DuplicateMessageError:
+ LOG.exception("ignoring duplicate message %s", ctxt.msg_id)
+ return
+ if self.use_cache:
+ self.msg_id_cache.add(unique_id)
if ctxt.msg_id:
LOG.debug("received message msg_id: %(msg_id)s reply to "
"%(queue)s", {'queue': ctxt.reply_q,
@@ -351,7 +358,7 @@
self.conn.consume(timeout=min(self._current_timeout, left))
except rpc_common.Timeout:
LOG.debug("AMQPListener connection timeout")
- self._current_timeout = max(self._current_timeout * 2,
+ self._current_timeout = min(self._current_timeout * 2,
ACK_REQUEUE_EVERY_SECONDS_MAX)
else:
self._current_timeout = ACK_REQUEUE_EVERY_SECONDS_MIN
@@ -389,6 +396,7 @@
class RpcAMQPListener(AMQPListener):
message_cls = AMQPIncomingMessage
+ use_cache = True
def __call__(self, message):
# NOTE(kgiusti): In the original RPC implementation the RPC server
@@ -490,7 +498,7 @@
# ack every ACK_REQUEUE_EVERY_SECONDS_MAX seconds
self.conn.consume(timeout=current_timeout)
except rpc_common.Timeout:
- current_timeout = max(current_timeout * 2,
+ current_timeout = min(current_timeout * 2,
ACK_REQUEUE_EVERY_SECONDS_MAX)
except Exception:
LOG.exception("Failed to process incoming message, retrying..")
@@ -593,9 +601,10 @@
def _get_exchange(self, target):
return target.exchange or self._default_exchange
- def _get_connection(self, purpose=rpc_common.PURPOSE_SEND):
+ def _get_connection(self, purpose=rpc_common.PURPOSE_SEND, retry=None):
return rpc_common.ConnectionContext(self._connection_pool,
- purpose=purpose)
+ purpose=purpose,
+ retry=retry)
def _get_reply_q(self):
with self._reply_q_lock:
@@ -641,7 +650,7 @@
log_msg = "CAST unique_id: %s " % unique_id
try:
- with self._get_connection(rpc_common.PURPOSE_SEND) as conn:
+ with self._get_connection(rpc_common.PURPOSE_SEND, retry) as conn:
if notify:
exchange = self._get_exchange(target)
LOG.debug(log_msg + "NOTIFY exchange '%(exchange)s'"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/oslo.messaging-12.9.1/oslo_messaging/_drivers/common.py
new/oslo.messaging-12.14.0/oslo_messaging/_drivers/common.py
--- old/oslo.messaging-12.9.1/oslo_messaging/_drivers/common.py 2021-08-26
17:39:33.000000000 +0200
+++ new/oslo.messaging-12.14.0/oslo_messaging/_drivers/common.py
2022-05-12 12:25:30.000000000 +0200
@@ -392,7 +392,7 @@
If possible the function makes sure to return a connection to the pool.
"""
- def __init__(self, connection_pool, purpose):
+ def __init__(self, connection_pool, purpose, retry):
"""Create a new connection, or get one from the pool."""
self.connection = None
self.connection_pool = connection_pool
@@ -420,7 +420,7 @@
pooled = purpose == PURPOSE_SEND
if pooled:
- self.connection = connection_pool.get()
+ self.connection = connection_pool.get(retry=retry)
else:
self.connection = connection_pool.create(purpose)
self.pooled = pooled
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/oslo.messaging-12.9.1/oslo_messaging/_drivers/impl_rabbit.py
new/oslo.messaging-12.14.0/oslo_messaging/_drivers/impl_rabbit.py
--- old/oslo.messaging-12.9.1/oslo_messaging/_drivers/impl_rabbit.py
2021-08-26 17:39:33.000000000 +0200
+++ new/oslo.messaging-12.14.0/oslo_messaging/_drivers/impl_rabbit.py
2022-05-12 12:25:30.000000000 +0200
@@ -35,7 +35,6 @@
from oslo_config import cfg
from oslo_log import log as logging
from oslo_utils import eventletutils
-from oslo_utils import importutils
import oslo_messaging
from oslo_messaging._drivers import amqp as rpc_amqp
@@ -46,18 +45,6 @@
from oslo_messaging import _utils
from oslo_messaging import exceptions
-eventlet = importutils.try_import('eventlet')
-if eventlet and eventletutils.is_monkey_patched("thread"):
- # Here we initialize module with the native python threading module
- # if it was already monkey patched by eventlet/greenlet.
- stdlib_threading = eventlet.patcher.original('threading')
-else:
- # Manage the case where we run this driver in a non patched environment
- # and where user even so configure the driver to run heartbeat through
- # a python thread, if we don't do that when the heartbeat will start
- # we will facing an issue by trying to override the threading module.
- stdlib_threading = threading
-
# NOTE(sileht): don't exist in py2 socket module
TCP_USER_TIMEOUT = 18
@@ -87,6 +74,15 @@
deprecated_name='kombu_ssl_ca_certs',
help='SSL certification authority file '
'(valid only if SSL enabled).'),
+ cfg.BoolOpt('ssl_enforce_fips_mode',
+ default=False,
+ help='Global toggle for enforcing the OpenSSL FIPS mode. '
+ 'This feature requires Python support. '
+ 'This is available in Python 3.9 in all '
+ 'environments and may have been backported to older '
+ 'Python versions on select environments. If the Python '
+ 'executable used does not support OpenSSL FIPS mode, '
+ 'an exception will be raised.'),
cfg.BoolOpt('heartbeat_in_pthread',
default=True,
help="Run the health check heartbeat thread "
@@ -97,7 +93,7 @@
"example if the parent process has monkey patched the "
"stdlib by using eventlet/greenlet then the heartbeat "
"will be run through a green thread.",
- deprecated_for_removal=True),
+ ),
cfg.FloatOpt('kombu_reconnect_delay',
default=1.0,
deprecated_group='DEFAULT',
@@ -121,7 +117,7 @@
'unavailable. Takes effect only if more than one '
'RabbitMQ node is provided in config.'),
cfg.StrOpt('rabbit_login_method',
- choices=('PLAIN', 'AMQPLAIN', 'RABBIT-CR-DEMO'),
+ choices=('PLAIN', 'AMQPLAIN', 'EXTERNAL', 'RABBIT-CR-DEMO'),
default='AMQPLAIN',
deprecated_group='DEFAULT',
help='The RabbitMQ login method.'),
@@ -149,6 +145,17 @@
'nodes, run: '
"""\"rabbitmqctl set_policy HA '^(?!amq\\.).*' """
"""'{"ha-mode": "all"}' \""""),
+ cfg.BoolOpt('rabbit_quorum_queue',
+ default=False,
+ help='Use quorum queues in RabbitMQ (x-queue-type: quorum). '
+ 'The quorum queue is a modern queue type for RabbitMQ '
+ 'implementing a durable, replicated FIFO queue based on the '
+ 'Raft consensus algorithm. It is available as of '
+ 'RabbitMQ 3.8.0. If set this option will conflict with '
+ 'the HA queues (``rabbit_ha_queues``) aka mirrored queues, '
+ 'in other words the HA queues should be disabled, quorum '
+ 'queues durable by default so the amqp_durable_queues '
+ 'opion is ignored when this option enabled.'),
cfg.IntOpt('rabbit_transient_queues_ttl',
min=1,
default=1800,
@@ -191,7 +198,8 @@
LOG = logging.getLogger(__name__)
-def _get_queue_arguments(rabbit_ha_queues, rabbit_queue_ttl):
+def _get_queue_arguments(rabbit_ha_queues, rabbit_queue_ttl,
+ rabbit_quorum_queue):
"""Construct the arguments for declaring a queue.
If the rabbit_ha_queues option is set, we try to declare a mirrored queue
@@ -214,12 +222,31 @@
Setting a queue TTL causes the queue to be automatically deleted
if it is unused for the TTL duration. This is a helpful safeguard
to prevent queues with zero consumers from growing without bound.
+
+ If the rabbit_quorum_queue option is set, we try to declare a mirrored
+ queue as described here:
+
+ https://www.rabbitmq.com/quorum-queues.html
+
+ Setting x-queue-type to quorum means that replicated FIFO queue based on
+ the Raft consensus algorithm will be used. It is available as of
+ RabbitMQ 3.8.0. If set this option will conflict with
+ the HA queues (``rabbit_ha_queues``) aka mirrored queues,
+ in other words HA queues should be disabled.
"""
args = {}
+ if rabbit_quorum_queue and rabbit_ha_queues:
+ raise RuntimeError('Configuration Error: rabbit_quorum_queue '
+ 'and rabbit_ha_queues both enabled, queue '
+ 'type is quorum or HA (mirrored) not both')
+
if rabbit_ha_queues:
args['x-ha-policy'] = 'all'
+ if rabbit_quorum_queue:
+ args['x-queue-type'] = 'quorum'
+
if rabbit_queue_ttl > 0:
args['x-expires'] = rabbit_queue_ttl * 1000
@@ -248,7 +275,7 @@
def __init__(self, exchange_name, queue_name, routing_key, type, durable,
exchange_auto_delete, queue_auto_delete, callback,
nowait=False, rabbit_ha_queues=None, rabbit_queue_ttl=0,
- enable_cancel_on_failover=False):
+ enable_cancel_on_failover=False, rabbit_quorum_queue=False):
"""Init the Consumer class with the exchange_name, routing_key,
type, durable auto_delete
"""
@@ -262,7 +289,8 @@
self.type = type
self.nowait = nowait
self.queue_arguments = _get_queue_arguments(rabbit_ha_queues,
- rabbit_queue_ttl)
+ rabbit_queue_ttl,
+ rabbit_quorum_queue)
self.queue = None
self._declared_on = None
self.exchange = kombu.entity.Exchange(
@@ -465,16 +493,18 @@
class Connection(object):
"""Connection object."""
- def __init__(self, conf, url, purpose):
+ def __init__(self, conf, url, purpose, retry=None):
# NOTE(viktors): Parse config options
driver_conf = conf.oslo_messaging_rabbit
self.interval_start = driver_conf.rabbit_retry_interval
self.interval_stepping = driver_conf.rabbit_retry_backoff
self.interval_max = driver_conf.rabbit_interval_max
+ self.max_retries = retry
self.login_method = driver_conf.rabbit_login_method
self.rabbit_ha_queues = driver_conf.rabbit_ha_queues
+ self.rabbit_quorum_queue = driver_conf.rabbit_quorum_queue
self.rabbit_transient_queues_ttl = \
driver_conf.rabbit_transient_queues_ttl
self.rabbit_qos_prefetch_count = driver_conf.rabbit_qos_prefetch_count
@@ -490,6 +520,7 @@
self.kombu_failover_strategy = driver_conf.kombu_failover_strategy
self.kombu_compression = driver_conf.kombu_compression
self.heartbeat_in_pthread = driver_conf.heartbeat_in_pthread
+ self.ssl_enforce_fips_mode = driver_conf.ssl_enforce_fips_mode
self.enable_cancel_on_failover = driver_conf.enable_cancel_on_failover
if self.heartbeat_in_pthread:
@@ -517,7 +548,7 @@
# threading module with the native python threading module
# if it was already monkey patched by eventlet/greenlet.
global threading
- threading = stdlib_threading
+ threading = _utils.stdlib_threading
self.direct_mandatory_flag = driver_conf.direct_mandatory_flag
@@ -527,6 +558,19 @@
self.ssl_cert_file = driver_conf.ssl_cert_file
self.ssl_ca_file = driver_conf.ssl_ca_file
+ if self.ssl_enforce_fips_mode:
+ if hasattr(ssl, 'FIPS_mode'):
+ LOG.info("Enforcing the use of the OpenSSL FIPS mode")
+ ssl.FIPS_mode_set(1)
+ else:
+ raise exceptions.ConfigurationError(
+ "OpenSSL FIPS mode is not supported by your Python "
+ "version. You must either change the Python "
+ "executable used to a version with FIPS mode "
+ "support or disable FIPS mode by setting the "
+ "'[oslo_messaging_rabbit] ssl_enforce_fips_mode' "
+ "configuration option to 'False'.")
+
self._url = ''
if url.hosts:
if url.transport.startswith('kombu+'):
@@ -674,6 +718,12 @@
except AttributeError:
pass
+ @property
+ def durable(self):
+ # Quorum queues are durable by default, durable option should
+ # be enabled by default with quorum queues
+ return self.amqp_durable_queues or self.rabbit_quorum_queue
+
@classmethod
def validate_ssl_version(cls, version):
key = version.lower()
@@ -741,7 +791,13 @@
str(exc), interval)
self._set_current_channel(None)
- self.connection.ensure_connection(errback=on_error)
+ self.connection.ensure_connection(
+ errback=on_error,
+ max_retries=self.max_retries,
+ interval_start=self.interval_start or 1,
+ interval_step=self.interval_stepping,
+ interval_max=self.interval_max,
+ )
self._set_current_channel(self.connection.channel())
self.set_transport_socket_timeout()
@@ -1163,12 +1219,13 @@
queue_name=queue_name or topic,
routing_key=topic,
type='topic',
- durable=self.amqp_durable_queues,
+ durable=self.durable,
exchange_auto_delete=self.amqp_auto_delete,
queue_auto_delete=self.amqp_auto_delete,
callback=callback,
rabbit_ha_queues=self.rabbit_ha_queues,
- enable_cancel_on_failover=self.enable_cancel_on_failover)
+ enable_cancel_on_failover=self.enable_cancel_on_failover,
+ rabbit_quorum_queue=self.rabbit_quorum_queue)
self.declare_consumer(consumer)
@@ -1280,7 +1337,10 @@
auto_delete=exchange.auto_delete,
name=routing_key,
routing_key=routing_key,
- queue_arguments=_get_queue_arguments(self.rabbit_ha_queues, 0))
+ queue_arguments=_get_queue_arguments(
+ self.rabbit_ha_queues,
+ 0,
+ self.rabbit_quorum_queue))
log_info = {'key': routing_key, 'exchange': exchange}
LOG.trace(
'Connection._publish_and_creates_default_queue: '
@@ -1336,7 +1396,7 @@
exchange = kombu.entity.Exchange(
name=exchange_name,
type='topic',
- durable=self.amqp_durable_queues,
+ durable=self.durable,
auto_delete=self.amqp_auto_delete)
self._ensure_publishing(self._publish, exchange, msg,
@@ -1358,7 +1418,7 @@
exchange = kombu.entity.Exchange(
name=exchange_name,
type='topic',
- durable=self.amqp_durable_queues,
+ durable=self.durable,
auto_delete=self.amqp_auto_delete)
self._ensure_publishing(self._publish_and_creates_default_queue,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/oslo.messaging-12.9.1/oslo_messaging/_drivers/pool.py
new/oslo.messaging-12.14.0/oslo_messaging/_drivers/pool.py
--- old/oslo.messaging-12.9.1/oslo_messaging/_drivers/pool.py 2021-08-26
17:39:33.000000000 +0200
+++ new/oslo.messaging-12.14.0/oslo_messaging/_drivers/pool.py 2022-05-12
12:25:30.000000000 +0200
@@ -69,7 +69,7 @@
self._items.append((ttl_watch, item))
self._cond.notify()
- def get(self):
+ def get(self, retry=None):
"""Return an item from the pool, when one is available.
This may cause the calling thread to block.
@@ -95,7 +95,7 @@
# We've grabbed a slot and dropped the lock, now do the creation
try:
- return self.create()
+ return self.create(retry=retry)
except Exception:
with self._cond:
self._current_size -= 1
@@ -111,7 +111,7 @@
return
@abc.abstractmethod
- def create(self):
+ def create(self, retry=None):
"""Construct a new item."""
@@ -130,9 +130,9 @@
LOG.debug("Idle connection has expired and been closed."
" Pool size: %d" % len(self._items))
- def create(self, purpose=common.PURPOSE_SEND):
+ def create(self, purpose=common.PURPOSE_SEND, retry=None):
LOG.debug('Pool creating new connection')
- return self.connection_cls(self.conf, self.url, purpose)
+ return self.connection_cls(self.conf, self.url, purpose, retry=retry)
def empty(self):
for item in self.iter_free():
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/oslo.messaging-12.9.1/oslo_messaging/_utils.py
new/oslo.messaging-12.14.0/oslo_messaging/_utils.py
--- old/oslo.messaging-12.9.1/oslo_messaging/_utils.py 2021-08-26
17:39:33.000000000 +0200
+++ new/oslo.messaging-12.14.0/oslo_messaging/_utils.py 2022-05-12
12:25:30.000000000 +0200
@@ -14,11 +14,25 @@
# under the License.
import logging
+import threading
from oslo_utils import eventletutils
+from oslo_utils import importutils
LOG = logging.getLogger(__name__)
+eventlet = importutils.try_import('eventlet')
+if eventlet and eventletutils.is_monkey_patched("thread"):
+ # Here we initialize module with the native python threading module
+ # if it was already monkey patched by eventlet/greenlet.
+ stdlib_threading = eventlet.patcher.original('threading')
+else:
+ # Manage the case where we run this driver in a non patched environment
+ # and where user even so configure the driver to run heartbeat through
+ # a python thread, if we don't do that when the heartbeat will start
+ # we will facing an issue by trying to override the threading module.
+ stdlib_threading = threading
+
def version_is_compatible(imp_version, version):
"""Determine whether versions are compatible.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/oslo.messaging-12.9.1/oslo_messaging/exceptions.py
new/oslo.messaging-12.14.0/oslo_messaging/exceptions.py
--- old/oslo.messaging-12.9.1/oslo_messaging/exceptions.py 2021-08-26
17:39:33.000000000 +0200
+++ new/oslo.messaging-12.14.0/oslo_messaging/exceptions.py 2022-05-12
12:25:30.000000000 +0200
@@ -47,3 +47,7 @@
self.exchange = exchange
self.routing_key = routing_key
self.message = message
+
+
+class ConfigurationError(Exception):
+ """Raised when messaging isn't configured correctly."""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/oslo.messaging-12.9.1/oslo_messaging/notify/messaging.py
new/oslo.messaging-12.14.0/oslo_messaging/notify/messaging.py
--- old/oslo.messaging-12.9.1/oslo_messaging/notify/messaging.py
2021-08-26 17:39:33.000000000 +0200
+++ new/oslo.messaging-12.14.0/oslo_messaging/notify/messaging.py
2022-05-12 12:25:30.000000000 +0200
@@ -21,19 +21,30 @@
The messaging drivers publish notification messages to notification
listeners.
-The driver will block the notifier's thread until the notification message has
-been passed to the messaging transport. There is no guarantee that the
-notification message will be consumed by a notification listener.
+In case of the rabbit backend the driver will block the notifier's thread
+until the notification message has been passed to the messaging transport.
+There is no guarantee that the notification message will be consumed by a
+notification listener.
+
+In case of the kafka backend the driver will not block the notifier's thread
+but return immediately. The driver will try to deliver the message in the
+background.
Notification messages are sent 'at-most-once' - ensuring that they are not
duplicated.
If the connection to the messaging service is not active when a notification is
-sent this driver will block waiting for the connection to complete. If the
-connection fails to complete, the driver will try to re-establish that
+sent the rabbit backend will block waiting for the connection to complete.
+If the connection fails to complete, the driver will try to re-establish that
connection. By default this will continue indefinitely until the connection
completes. However, the retry parameter can be used to have the notification
-send fail with a MessageDeliveryFailure after the given number of retries.
+send fail. In this case an error is logged and the notifier's thread is resumed
+without any error.
+
+If the connection to the messaging service is not active when a notification is
+sent the kafka backend will return immediately and the backend tries to
+establish the connection and deliver the messages in the background.
+
"""
import logging
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/oslo.messaging-12.9.1/oslo_messaging/tests/drivers/test_impl_rabbit.py
new/oslo.messaging-12.14.0/oslo_messaging/tests/drivers/test_impl_rabbit.py
--- old/oslo.messaging-12.9.1/oslo_messaging/tests/drivers/test_impl_rabbit.py
2021-08-26 17:39:33.000000000 +0200
+++ new/oslo.messaging-12.14.0/oslo_messaging/tests/drivers/test_impl_rabbit.py
2022-05-12 12:25:30.000000000 +0200
@@ -31,6 +31,7 @@
from oslo_messaging._drivers import amqpdriver
from oslo_messaging._drivers import common as driver_common
from oslo_messaging._drivers import impl_rabbit as rabbit_driver
+from oslo_messaging.exceptions import ConfigurationError
from oslo_messaging.exceptions import MessageDeliveryFailure
from oslo_messaging.tests import utils as test_utils
from oslo_messaging.transport import DriverLoadFailure
@@ -205,6 +206,65 @@
)
+class TestRabbitDriverLoadSSLWithFIPS(test_utils.BaseTestCase):
+ scenarios = [
+ ('ssl_fips_mode', dict(options=dict(ssl=True,
+ ssl_enforce_fips_mode=True),
+ expected=True)),
+ ]
+
+ @mock.patch('oslo_messaging._drivers.impl_rabbit.Connection'
+ '.ensure_connection')
+ @mock.patch('kombu.connection.Connection')
+ def test_driver_load_with_fips_supported(self,
+ connection_klass, fake_ensure):
+ self.config(ssl=True, ssl_enforce_fips_mode=True,
+ group="oslo_messaging_rabbit")
+ transport = oslo_messaging.get_transport(self.conf,
+ 'kombu+memory:////')
+ self.addCleanup(transport.cleanup)
+
+ with mock.patch.object(ssl, 'FIPS_mode',
+ create=True, return_value=True):
+ with mock.patch.object(ssl, 'FIPS_mode_set', create=True):
+
+ connection = transport._driver._get_connection()
+ connection_klass.assert_called_once_with(
+ 'memory:///', transport_options={
+ 'client_properties': {
+ 'capabilities': {
+ 'connection.blocked': True,
+ 'consumer_cancel_notify': True,
+ 'authentication_failure_close': True,
+ },
+ 'connection_name': connection.name},
+ 'confirm_publish': True,
+ 'on_blocked': mock.ANY,
+ 'on_unblocked': mock.ANY},
+ ssl=self.expected, login_method='AMQPLAIN',
+ heartbeat=60, failover_strategy='round-robin'
+ )
+
+ @mock.patch('oslo_messaging._drivers.impl_rabbit.Connection'
+ '.ensure_connection')
+ @mock.patch('oslo_messaging._drivers.impl_rabbit.ssl')
+ @mock.patch('kombu.connection.Connection')
+ def test_fips_unsupported(self, connection_klass, fake_ssl, fake_ensure):
+ self.config(ssl=True, ssl_enforce_fips_mode=True,
+ group="oslo_messaging_rabbit")
+ transport = oslo_messaging.get_transport(self.conf,
+ 'kombu+memory:////')
+ self.addCleanup(transport.cleanup)
+
+ del fake_ssl.FIPS_mode
+
+ # We do this test only if FIPS mode is not supported to
+ # ensure that we hard fail.
+ self.assertRaises(
+ ConfigurationError,
+ transport._driver._get_connection)
+
+
class TestRabbitPublisher(test_utils.BaseTestCase):
@mock.patch('kombu.messaging.Producer.publish')
def test_send_with_timeout(self, fake_publish):
@@ -1008,21 +1068,36 @@
self.assertRaises(oslo_messaging.MessageDeliveryFailure,
self.connection.ensure, mock_callback,
retry=4)
- self.assertEqual(6, mock_callback.call_count)
+ # TODO(stephenfin): Remove when we drop support for kombu < 5.2.4
+ expected = 5
+ if kombu.VERSION < (5, 2, 4):
+ expected = 6
+ self.assertEqual(expected, mock_callback.call_count)
def test_ensure_one_retry(self):
mock_callback = mock.Mock(side_effect=IOError)
self.assertRaises(oslo_messaging.MessageDeliveryFailure,
self.connection.ensure, mock_callback,
retry=1)
- self.assertEqual(3, mock_callback.call_count)
+ # TODO(stephenfin): Remove when we drop support for kombu < 5.2.4
+ expected = 2
+ if kombu.VERSION < (5, 2, 4):
+ expected = 3
+ self.assertEqual(expected, mock_callback.call_count)
def test_ensure_no_retry(self):
mock_callback = mock.Mock(side_effect=IOError)
- self.assertRaises(oslo_messaging.MessageDeliveryFailure,
- self.connection.ensure, mock_callback,
- retry=0)
- self.assertEqual(2, mock_callback.call_count)
+ self.assertRaises(
+ oslo_messaging.MessageDeliveryFailure,
+ self.connection.ensure,
+ mock_callback,
+ retry=0,
+ )
+ # TODO(stephenfin): Remove when we drop support for kombu < 5.2.4
+ expected = 1
+ if kombu.VERSION < (5, 2, 4):
+ expected = 2
+ self.assertEqual(expected, mock_callback.call_count)
class ConnectionLockTestCase(test_utils.BaseTestCase):
@@ -1080,3 +1155,82 @@
t2 = self._thread(lock, 1)
self.assertAlmostEqual(1, t1(), places=0)
self.assertAlmostEqual(2, t2(), places=0)
+
+
+class TestPollTimeoutLimit(test_utils.BaseTestCase):
+ def test_poll_timeout_limit(self):
+ transport = oslo_messaging.get_transport(self.conf,
+ 'kombu+memory:////')
+ self.addCleanup(transport.cleanup)
+ driver = transport._driver
+ target = oslo_messaging.Target(topic='testtopic')
+ listener = driver.listen(target, None, None)._poll_style_listener
+
+ thread = threading.Thread(target=listener.poll)
+ thread.daemon = True
+ thread.start()
+ time.sleep(amqpdriver.ACK_REQUEUE_EVERY_SECONDS_MAX * 2)
+
+ try:
+ # timeout should not grow past the maximum
+ self.assertEqual(amqpdriver.ACK_REQUEUE_EVERY_SECONDS_MAX,
+ listener._current_timeout)
+
+ finally:
+ # gracefully stop waiting
+ driver.send(target,
+ {},
+ {'tx_id': 'test'})
+ thread.join()
+
+
+class TestMsgIdCache(test_utils.BaseTestCase):
+ @mock.patch('kombu.message.Message.reject')
+ def test_reply_wire_format(self, reject_mock):
+ self.conf.oslo_messaging_rabbit.kombu_compression = None
+
+ transport = oslo_messaging.get_transport(self.conf,
+ 'kombu+memory:////')
+ self.addCleanup(transport.cleanup)
+
+ driver = transport._driver
+
+ target = oslo_messaging.Target(topic='testtopic',
+ server=None,
+ fanout=False)
+
+ listener = driver.listen(target, None, None)._poll_style_listener
+
+ connection, producer = _create_producer(target)
+ self.addCleanup(connection.release)
+
+ msg = {
+ 'oslo.version': '2.0',
+ 'oslo.message': {}
+ }
+
+ msg['oslo.message'].update({
+ '_msg_id': uuid.uuid4().hex,
+ '_unique_id': uuid.uuid4().hex,
+ '_reply_q': 'reply_' + uuid.uuid4().hex,
+ '_timeout': None,
+ })
+
+ msg['oslo.message'] = jsonutils.dumps(msg['oslo.message'])
+
+ producer.publish(msg)
+
+ received = listener.poll()[0]
+ self.assertIsNotNone(received)
+ self.assertEqual({}, received.message)
+
+ # publish the same message a second time
+ producer.publish(msg)
+
+ received = listener.poll(timeout=1)
+
+ # duplicate message is ignored
+ self.assertEqual(len(received), 0)
+
+ # we should not reject duplicate message
+ reject_mock.assert_not_called()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/oslo.messaging-12.9.1/oslo_messaging/tests/drivers/test_pool.py
new/oslo.messaging-12.14.0/oslo_messaging/tests/drivers/test_pool.py
--- old/oslo.messaging-12.9.1/oslo_messaging/tests/drivers/test_pool.py
2021-08-26 17:39:33.000000000 +0200
+++ new/oslo.messaging-12.14.0/oslo_messaging/tests/drivers/test_pool.py
2022-05-12 12:25:30.000000000 +0200
@@ -44,7 +44,7 @@
class TestPool(pool.Pool):
- def create(self):
+ def create(self, retry=None):
return uuid.uuid4()
class ThreadWaitWaiter(object):
@@ -82,7 +82,7 @@
p = self.TestPool(**kwargs)
if self.create_error:
- def create_error():
+ def create_error(retry=None):
raise RuntimeError
orig_create = p.create
self.useFixture(fixtures.MockPatchObject(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/oslo.messaging-12.9.1/oslo_messaging/tests/notify/test_notifier.py
new/oslo.messaging-12.14.0/oslo_messaging/tests/notify/test_notifier.py
--- old/oslo.messaging-12.9.1/oslo_messaging/tests/notify/test_notifier.py
2021-08-26 17:39:33.000000000 +0200
+++ new/oslo.messaging-12.14.0/oslo_messaging/tests/notify/test_notifier.py
2022-05-12 12:25:30.000000000 +0200
@@ -18,6 +18,7 @@
import uuid
import fixtures
+from kombu import connection
from oslo_serialization import jsonutils
from oslo_utils import strutils
from oslo_utils import timeutils
@@ -228,6 +229,80 @@
TestMessagingNotifier.generate_scenarios()
+class TestMessagingNotifierRetry(test_utils.BaseTestCase):
+
+ class TestingException(BaseException):
+ pass
+
+ def test_notifier_retry_connection_fails_rabbit(self):
+ """This test sets a small retry number for notification sending and
+ configures a non reachable message bus. The expectation that after the
+ configured number of retries the driver gives up the message sending.
+ """
+ self.config(
+ driver=["messagingv2"],
+ topics=["test-retry"],
+ retry=2,
+ group="oslo_messaging_notifications")
+ self.config(
+ # just to speed up the test execution
+ rabbit_retry_backoff=0,
+ group="oslo_messaging_rabbit")
+ transport = oslo_messaging.get_notification_transport(
+ self.conf, url='rabbit://')
+ notifier = oslo_messaging.Notifier(transport)
+
+ orig_establish_connection = connection.Connection._establish_connection
+ calls = []
+
+ def wrapped_establish_connection(*args, **kwargs):
+ if len(calls) > 2:
+ raise self.TestingException(
+ "Connection should only be retried twice due to "
+ "configuration")
+ else:
+ calls.append((args, kwargs))
+ orig_establish_connection(*args, **kwargs)
+
+ with mock.patch(
+ 'kombu.connection.Connection._establish_connection',
+ new=wrapped_establish_connection
+ ):
+ with mock.patch(
+ 'oslo_messaging.notify.messaging.LOG.exception'
+ ) as mock_log:
+ notifier.info({}, "test", {})
+
+ # one normal call plus two retries
+ self.assertEqual(3, len(calls))
+ # the error was caught and logged
+ mock_log.assert_called_once()
+
+ def test_notifier_retry_connection_fails_kafka(self):
+ """This test sets a small retry number for notification sending and
+ configures a non reachable message bus. The expectation that after the
+ configured number of retries the driver gives up the message sending.
+ """
+
+ self.config(
+ driver=["messagingv2"],
+ topics=["test-retry"],
+ retry=2,
+ group='oslo_messaging_notifications')
+
+ transport = oslo_messaging.get_notification_transport(
+ self.conf, url='kafka://')
+
+ notifier = oslo_messaging.Notifier(transport)
+
+ # Kafka's message producer interface is async, and there is no way
+ # from the oslo interface to force sending a pending message. So this
+ # call simply returns without i) failing to deliver the message to
+ # the non existent kafka bus ii) retrying the message delivery twice
+ # as the configuration requested it.
+ notifier.info({}, "test", {})
+
+
class TestSerializer(test_utils.BaseTestCase):
def setUp(self):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/oslo.messaging-12.9.1/releasenotes/notes/adding_support_for_quorum_queues-3101d055b492289e.yaml
new/oslo.messaging-12.14.0/releasenotes/notes/adding_support_for_quorum_queues-3101d055b492289e.yaml
---
old/oslo.messaging-12.9.1/releasenotes/notes/adding_support_for_quorum_queues-3101d055b492289e.yaml
1970-01-01 01:00:00.000000000 +0100
+++
new/oslo.messaging-12.14.0/releasenotes/notes/adding_support_for_quorum_queues-3101d055b492289e.yaml
2022-05-12 12:25:30.000000000 +0200
@@ -0,0 +1,11 @@
+---
+features:
+ - |
+ Adding support for quorum queues. Quorum queues are enabled if the
+ ``rabbit_quorum_queue`` parameter is sets (``x-queue-type: quorum``).
+ Setting x-queue-type to quorum means that replicated FIFO queue based on
+ the Raft consensus algorithm will be used. It is available as of
+ RabbitMQ 3.8.0. The quorum queues are durable by default
+ (``amqp_durable_queues``) will be ignored.
+ when enabled the HA queues (``rabbit_ha_queues``) aka mirrored queues
+ should be disabled since the queue can't be both types at the same time
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/oslo.messaging-12.9.1/releasenotes/notes/bug-1917645-rabbit-use-retry-parameter-for-notifications-3f7c508ab4437579.yaml
new/oslo.messaging-12.14.0/releasenotes/notes/bug-1917645-rabbit-use-retry-parameter-for-notifications-3f7c508ab4437579.yaml
---
old/oslo.messaging-12.9.1/releasenotes/notes/bug-1917645-rabbit-use-retry-parameter-for-notifications-3f7c508ab4437579.yaml
1970-01-01 01:00:00.000000000 +0100
+++
new/oslo.messaging-12.14.0/releasenotes/notes/bug-1917645-rabbit-use-retry-parameter-for-notifications-3f7c508ab4437579.yaml
2022-05-12 12:25:30.000000000 +0200
@@ -0,0 +1,8 @@
+---
+fixes:
+ - |
+ As a fix for `bug 1917645 <https://launchpad.net/bugs/1917645>`_ the rabbit
+ backend is changed to use the ``[oslo_messaging_notifications]retry``
+ parameter when driver tries to connect to the message bus during
+ notification sending. Before this fix the rabbit backend retried the
+ connection forever blocking the caller thread.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/oslo.messaging-12.9.1/releasenotes/notes/enforce_fips_mode-07dd259eb8a73c2b.yaml
new/oslo.messaging-12.14.0/releasenotes/notes/enforce_fips_mode-07dd259eb8a73c2b.yaml
---
old/oslo.messaging-12.9.1/releasenotes/notes/enforce_fips_mode-07dd259eb8a73c2b.yaml
1970-01-01 01:00:00.000000000 +0100
+++
new/oslo.messaging-12.14.0/releasenotes/notes/enforce_fips_mode-07dd259eb8a73c2b.yaml
2022-05-12 12:25:30.000000000 +0200
@@ -0,0 +1,10 @@
+---
+features:
+ - |
+ Adding a new option, ``[oslo_messaging_rabbit] ssl_enforce_fips_mode``, to
+ the rabbitmq driver to enforce the OpenSSL FIPS mode if supported by the
+ version of Python.
+security:
+ - |
+ We are now able to enforce the OpenSSL FIPS mode by using
+ ``[oslo_messaging_rabbit] ssl_enforce_fips_mode``.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/oslo.messaging-12.9.1/releasenotes/notes/undeprecate_heartbeat_in_pthread-48e2c1fc008cf208.yaml
new/oslo.messaging-12.14.0/releasenotes/notes/undeprecate_heartbeat_in_pthread-48e2c1fc008cf208.yaml
---
old/oslo.messaging-12.9.1/releasenotes/notes/undeprecate_heartbeat_in_pthread-48e2c1fc008cf208.yaml
1970-01-01 01:00:00.000000000 +0100
+++
new/oslo.messaging-12.14.0/releasenotes/notes/undeprecate_heartbeat_in_pthread-48e2c1fc008cf208.yaml
2022-05-12 12:25:30.000000000 +0200
@@ -0,0 +1,6 @@
+---
+upgrade:
+ - |
+ We undeprecated the ``heartbeat_in_pthread`` option. This option will
+ remain available to allow customers to run the rabbitmq heartbeat in
+ python thread or not.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/oslo.messaging-12.9.1/releasenotes/source/index.rst
new/oslo.messaging-12.14.0/releasenotes/source/index.rst
--- old/oslo.messaging-12.9.1/releasenotes/source/index.rst 2021-08-26
17:39:33.000000000 +0200
+++ new/oslo.messaging-12.14.0/releasenotes/source/index.rst 2022-05-12
12:25:30.000000000 +0200
@@ -6,6 +6,8 @@
:maxdepth: 1
unreleased
+ yoga
+ xena
wallaby
victoria
ussuri
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/oslo.messaging-12.9.1/releasenotes/source/xena.rst
new/oslo.messaging-12.14.0/releasenotes/source/xena.rst
--- old/oslo.messaging-12.9.1/releasenotes/source/xena.rst 1970-01-01
01:00:00.000000000 +0100
+++ new/oslo.messaging-12.14.0/releasenotes/source/xena.rst 2022-05-12
12:25:30.000000000 +0200
@@ -0,0 +1,6 @@
+=========================
+Xena Series Release Notes
+=========================
+
+.. release-notes::
+ :branch: stable/xena
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/oslo.messaging-12.9.1/releasenotes/source/yoga.rst
new/oslo.messaging-12.14.0/releasenotes/source/yoga.rst
--- old/oslo.messaging-12.9.1/releasenotes/source/yoga.rst 1970-01-01
01:00:00.000000000 +0100
+++ new/oslo.messaging-12.14.0/releasenotes/source/yoga.rst 2022-05-12
12:25:30.000000000 +0200
@@ -0,0 +1,6 @@
+=========================
+Yoga Series Release Notes
+=========================
+
+.. release-notes::
+ :branch: stable/yoga
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/oslo.messaging-12.9.1/setup.cfg
new/oslo.messaging-12.14.0/setup.cfg
--- old/oslo.messaging-12.9.1/setup.cfg 2021-08-26 17:40:14.166091400 +0200
+++ new/oslo.messaging-12.14.0/setup.cfg 2022-05-12 12:26:02.903510000
+0200
@@ -18,6 +18,7 @@
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
+ Programming Language :: Python :: 3.9
Programming Language :: Python :: 3 :: Only
Programming Language :: Python :: Implementation :: CPython