[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#986198: marked as done (unblock: python-oslo.messaging/12.5.2-1)



Your message dated Thu, 01 Apr 2021 10:39:34 +0000
with message-id <E1lRuje-00046G-Ht@respighi.debian.org>
and subject line unblock python-oslo.messaging
has caused the Debian Bug report #986198,
regarding unblock: python-oslo.messaging/12.5.2-1
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
986198: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=986198
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock

Dear release team,

This is a bug-fix point release from upstream adding some
exception handling in the oslo.messaging code, which I
believe would be valuable to have in Debian.

Only the .py upstream source code change is relevant to
read in the attached debdiff (the rest of is upstream CI
configuration).

Please unblock python-oslo.messaging/12.5.2-1.

Cheers,

Thomas Goirand (zigo)
diff -Nru python-oslo.messaging-12.5.1/debian/changelog python-oslo.messaging-12.5.2/debian/changelog
--- python-oslo.messaging-12.5.1/debian/changelog	2020-12-20 10:30:34.000000000 +0100
+++ python-oslo.messaging-12.5.2/debian/changelog	2021-03-31 13:18:24.000000000 +0200
@@ -1,3 +1,9 @@
+python-oslo.messaging (12.5.2-1) unstable; urgency=medium
+
+  * New upstream release.
+
+ -- Thomas Goirand <zigo@debian.org>  Wed, 31 Mar 2021 13:18:24 +0200
+
 python-oslo.messaging (12.5.1-1) unstable; urgency=medium
 
   * New upstream version
diff -Nru python-oslo.messaging-12.5.1/doc/source/admin/rabbit.rst python-oslo.messaging-12.5.2/doc/source/admin/rabbit.rst
--- python-oslo.messaging-12.5.1/doc/source/admin/rabbit.rst	2020-10-15 14:25:27.000000000 +0200
+++ python-oslo.messaging-12.5.2/doc/source/admin/rabbit.rst	2021-02-18 11:46:49.000000000 +0100
@@ -66,7 +66,8 @@
 through the *Connection* class.
 
 With mandatory flag RabbitMQ raises a callback if the message is not routed to
-any queue.
+any queue. This callback will be used to loop for a timeout and let's a chance
+to sender to recover.
 
 .. _Exchange is a AMQP mechanism: https://www.rabbitmq.com/tutorials/amqp-concepts.html#exchanges
 .. _queues: https://www.rabbitmq.com/queues.html
diff -Nru python-oslo.messaging-12.5.1/lower-constraints.txt python-oslo.messaging-12.5.2/lower-constraints.txt
--- python-oslo.messaging-12.5.1/lower-constraints.txt	2020-10-15 14:25:27.000000000 +0200
+++ python-oslo.messaging-12.5.2/lower-constraints.txt	1970-01-01 01:00:00.000000000 +0100
@@ -1,83 +0,0 @@
-alabaster==0.7.10
-amqp==2.5.2
-appdirs==1.3.0
-Babel==2.3.4
-bandit==1.1.0
-cachetools==2.0.0
-cffi==1.14.0
-cliff==2.8.0
-cmd2==0.8.0
-confluent-kafka==1.3.0
-contextlib2==0.4.0
-coverage==4.0
-debtcollector==1.2.0
-docutils==0.11
-dulwich==0.15.0
-eventlet==0.23.0
-extras==1.0.0
-fasteners==0.7.0
-fixtures==3.0.0
-futurist==1.2.0
-gitdb==0.6.4
-GitPython==1.0.1
-greenlet==0.4.15
-imagesize==0.7.1
-iso8601==0.1.11
-Jinja2==2.10
-keystoneauth1==3.4.0
-kombu==4.6.6
-linecache2==1.0.0
-MarkupSafe==1.1.1
-mock==2.0.0
-mox3==0.20.0
-msgpack-python==0.4.0
-netaddr==0.8.0
-netifaces==0.10.4
-os-client-config==1.28.0
-oslo.concurrency==3.25.0
-oslo.config==5.2.0
-oslo.context==2.19.2
-oslo.i18n==3.15.3
-oslo.log==3.36.0
-oslo.middleware==3.31.0
-oslo.serialization==2.18.0
-oslo.service==1.24.0
-oslo.utils==3.37.0
-oslotest==3.2.0
-Paste==2.0.2
-PasteDeploy==1.5.0
-pbr==2.0.0
-pifpaf==2.2.0
-prettytable==0.7.2
-pycparser==2.18
-Pygments==2.2.0
-pyinotify==0.9.6
-pyngus==2.2.0
-pyparsing==2.1.0
-pyperclip==1.5.27
-python-dateutil==2.5.3
-python-mimeparse==1.6.0
-python-qpid-proton==0.20.0
-python-subunit==1.0.0
-pytz==2013.6
-PyYAML==3.13
-repoze.lru==0.7
-requests==2.14.2
-requestsexceptions==1.2.0
-rfc3986==0.3.1
-Routes==2.3.1
-six==1.10.0
-smmap==0.9.0
-snowballstemmer==1.2.1
-statsd==3.2.1
-stestr==2.0.0
-stevedore==1.20.0
-tenacity==4.4.0
-testscenarios==0.4
-testtools==2.2.0
-traceback2==1.4.0
-unittest2==1.1.0
-vine==1.1.4
-WebOb==1.7.1
-wrapt==1.7.0
-xattr==0.9.2
diff -Nru python-oslo.messaging-12.5.1/oslo_messaging/_drivers/amqpdriver.py python-oslo.messaging-12.5.2/oslo_messaging/_drivers/amqpdriver.py
--- python-oslo.messaging-12.5.1/oslo_messaging/_drivers/amqpdriver.py	2020-10-15 14:25:27.000000000 +0200
+++ python-oslo.messaging-12.5.2/oslo_messaging/_drivers/amqpdriver.py	2021-02-18 11:46:49.000000000 +0100
@@ -145,39 +145,67 @@
         while True:
             try:
                 with self.listener.driver._get_connection(
-                        rpc_common.PURPOSE_SEND) as conn:
+                    rpc_common.PURPOSE_SEND,
+                ) as conn:
                     self._send_reply(conn, reply, failure)
+
                 return
-            except rpc_amqp.AMQPDestinationNotFound:
-                if timer.check_return() > 0:
-                    LOG.debug(("The reply %(msg_id)s cannot be sent  "
-                               "%(reply_q)s reply queue doesn't exist, "
-                               "retrying..."), {
-                                   'msg_id': self.msg_id,
-                                   'reply_q': self.reply_q})
-                    time.sleep(0.25)
-                else:
+            except oslo_messaging.MessageUndeliverable:
+                # queue not found
+                if timer.check_return() <= 0:
                     self._obsolete_reply_queues.add(self.reply_q, self.msg_id)
-                    infos = {
+                    LOG.error(
+                        'The reply %(msg_id)s failed to send after '
+                        '%(duration)d seconds due to a missing queue '
+                        '(%(reply_q)s). Abandoning...', {
+                            'msg_id': self.msg_id,
+                            'duration': duration,
+                            'reply_q': self.reply_q})
+                    return
+
+                LOG.debug(
+                    'The reply %(msg_id)s could not be sent due to a missing '
+                    'queue (%(reply_q)s). Retrying...', {
                         'msg_id': self.msg_id,
-                        'reply_q': self.reply_q,
-                        'duration': duration
-                    }
-                    LOG.info("The reply %(msg_id)s cannot be sent  "
-                             "%(reply_q)s reply queue don't exist after "
-                             "%(duration)s sec abandoning...", infos)
+                        'reply_q': self.reply_q})
+                time.sleep(0.25)
+            except rpc_amqp.AMQPDestinationNotFound as exc:
+                # exchange not found/down
+                if timer.check_return() <= 0:
+                    self._obsolete_reply_queues.add(self.reply_q, self.msg_id)
+                    LOG.error(
+                        'The reply %(msg_id)s failed to send after '
+                        '%(duration)d seconds due to a broker issue '
+                        '(%(exc)s). Abandoning...', {
+                            'msg_id': self.msg_id,
+                            'duration': duration,
+                            'exc': exc})
                     return
 
+                LOG.debug(
+                    'The reply %(msg_id)s could not be sent due to a broker '
+                    'issue (%(exc)s). Retrying...', {
+                        'msg_id': self.msg_id,
+                        'exc': exc})
+                time.sleep(0.25)
+
     def heartbeat(self):
         # generate a keep alive for RPC call monitoring
         with self.listener.driver._get_connection(
-                rpc_common.PURPOSE_SEND) as conn:
+            rpc_common.PURPOSE_SEND,
+        ) as conn:
             try:
                 self._send_reply(conn, None, None, ending=False)
+            except oslo_messaging.MessageUndeliverable:
+                # internal exception that indicates queue gone -
+                # broker unreachable.
+                raise MessageDeliveryFailure(
+                    "Heartbeat send failed. Missing queue")
             except rpc_amqp.AMQPDestinationNotFound:
-                # internal exception that indicates queue/exchange gone -
+                # internal exception that indicates exchange gone -
                 # broker unreachable.
-                raise MessageDeliveryFailure("Heartbeat send failed")
+                raise MessageDeliveryFailure(
+                    "Heartbeat send failed. Missing exchange")
 
     # NOTE(sileht): Those have already be ack in RpcListener IO thread
     # We keep them as noop until all drivers do the same
diff -Nru python-oslo.messaging-12.5.1/oslo_messaging/_drivers/impl_rabbit.py python-oslo.messaging-12.5.2/oslo_messaging/_drivers/impl_rabbit.py
--- python-oslo.messaging-12.5.1/oslo_messaging/_drivers/impl_rabbit.py	2020-10-15 14:25:27.000000000 +0200
+++ python-oslo.messaging-12.5.2/oslo_messaging/_drivers/impl_rabbit.py	2021-02-18 11:46:49.000000000 +0100
@@ -167,12 +167,18 @@
                default=2,
                help='How often times during the heartbeat_timeout_threshold '
                'we check the heartbeat.'),
-    cfg.IntOpt('direct_mandatory_flag',
-               default=True,
-               help='Enable/Disable the RabbitMQ mandatory flag '
-               'for direct send. The direct send is used as reply, '
-               'so the MessageUndeliverable exception is raised '
-               'in case the client queue does not exist.'),
+    cfg.BoolOpt('direct_mandatory_flag',
+                default=True,
+                deprecated_for_removal=True,
+                deprecated_reason='Mandatory flag no longer deactivable.',
+                help='(DEPRECATED) Enable/Disable the RabbitMQ mandatory '
+                'flag for direct send. The direct send is used as reply, '
+                'so the MessageUndeliverable exception is raised '
+                'in case the client queue does not exist.'
+                'MessageUndeliverable exception will be used to loop for a '
+                'timeout to lets a chance to sender to recover.'
+                'This flag is deprecated and it will not be possible to '
+                'deactivate this functionality anymore'),
     cfg.BoolOpt('enable_cancel_on_failover',
                 default=False,
                 help="Enable x-cancel-on-ha-failover flag so that "
@@ -510,6 +516,7 @@
             # if it was already monkey patched by eventlet/greenlet.
             global threading
             threading = stdlib_threading
+
         self.direct_mandatory_flag = driver_conf.direct_mandatory_flag
 
         if self.ssl:
diff -Nru python-oslo.messaging-12.5.1/releasenotes/notes/disable-mandatory-flag-a6210a534f3853f0.yaml python-oslo.messaging-12.5.2/releasenotes/notes/disable-mandatory-flag-a6210a534f3853f0.yaml
--- python-oslo.messaging-12.5.1/releasenotes/notes/disable-mandatory-flag-a6210a534f3853f0.yaml	1970-01-01 01:00:00.000000000 +0100
+++ python-oslo.messaging-12.5.2/releasenotes/notes/disable-mandatory-flag-a6210a534f3853f0.yaml	2021-02-18 11:46:49.000000000 +0100
@@ -0,0 +1,5 @@
+---
+upgrade:
+  - |
+    Deprecating the ``direct_mandatory_flag``. It will not be possible to
+    deactivate this functionality anymore.
diff -Nru python-oslo.messaging-12.5.1/releasenotes/notes/handle-missing-queue-553a803f94976be7.yaml python-oslo.messaging-12.5.2/releasenotes/notes/handle-missing-queue-553a803f94976be7.yaml
--- python-oslo.messaging-12.5.1/releasenotes/notes/handle-missing-queue-553a803f94976be7.yaml	1970-01-01 01:00:00.000000000 +0100
+++ python-oslo.messaging-12.5.2/releasenotes/notes/handle-missing-queue-553a803f94976be7.yaml	2021-02-18 11:46:49.000000000 +0100
@@ -0,0 +1,5 @@
+---
+features:
+  - |
+    Adding retry strategy based on the mandatory flag. Missing exchanges and
+    queues are now identified separately for logging purposes.
diff -Nru python-oslo.messaging-12.5.1/tox.ini python-oslo.messaging-12.5.2/tox.ini
--- python-oslo.messaging-12.5.1/tox.ini	2020-10-15 14:25:27.000000000 +0200
+++ python-oslo.messaging-12.5.2/tox.ini	2021-02-18 11:46:49.000000000 +0100
@@ -118,9 +118,3 @@
 [testenv:bindep]
 deps = bindep
 commands = bindep {posargs}
-
-[testenv:lower-constraints]
-deps =
-  -c{toxinidir}/lower-constraints.txt
-  -r{toxinidir}/test-requirements.txt
-  -r{toxinidir}/requirements.txt
diff -Nru python-oslo.messaging-12.5.1/.zuul.yaml python-oslo.messaging-12.5.2/.zuul.yaml
--- python-oslo.messaging-12.5.1/.zuul.yaml	2020-10-15 14:25:27.000000000 +0200
+++ python-oslo.messaging-12.5.2/.zuul.yaml	2021-02-18 11:46:49.000000000 +0100
@@ -108,7 +108,6 @@
       - check-requirements
       - lib-forward-testing-python3
       - openstack-cover-jobs
-      - openstack-lower-constraints-jobs
       - openstack-python3-victoria-jobs
       - periodic-stable-jobs
       - publish-openstack-docs-pti

--- End Message ---
--- Begin Message ---
Unblocked.

--- End Message ---

Reply to: