Hello community,

here is the log from the commit of package python-oslo.messaging for 
openSUSE:Factory checked in at 2016-12-04 15:08:24
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-oslo.messaging (Old)
 and      /work/SRC/openSUSE:Factory/.python-oslo.messaging.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-oslo.messaging"

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-oslo.messaging/python-oslo.messaging.changes  
    2016-10-13 11:31:27.000000000 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-oslo.messaging.new/python-oslo.messaging.changes
 2016-12-04 15:08:25.000000000 +0100
@@ -1,0 +2,15 @@
+Sat Dec  3 17:53:05 UTC 2016 - dmuel...@suse.com
+
+- update to 5.10.1:
+ * rabbit: on reconnect set socket timeout after channel is set
+ * Updated from global requirements
+ * rabbit: Avoid busy loop on epoll_wait with heartbeat+eventlet
+ * Fix consuming from unbound reply queue
+ * Update .gitreview for stable/newton
+
+-------------------------------------------------------------------
+Fri Oct 14 13:56:23 UTC 2016 - tbecht...@suse.com
+
+- Switch to stable/newton in _service
+
+-------------------------------------------------------------------

Old:
----
  oslo.messaging-5.10.0.tar.gz

New:
----
  oslo.messaging-5.10.1.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-oslo.messaging.spec ++++++
--- /var/tmp/diff_new_pack.ePLKFO/_old  2016-12-04 15:08:26.000000000 +0100
+++ /var/tmp/diff_new_pack.ePLKFO/_new  2016-12-04 15:08:26.000000000 +0100
@@ -18,7 +18,7 @@
 
 %global sname oslo.messaging
 Name:           python-oslo.messaging
-Version:        5.10.0
+Version:        5.10.1
 Release:        0
 Summary:        OpenStack oslo.messaging library
 License:        Apache-2.0
@@ -45,7 +45,7 @@
 BuildRequires:  python-oslo.config >= 3.14.0
 BuildRequires:  python-oslo.context >= 2.9.0
 BuildRequires:  python-oslo.i18n >= 2.1.0
-BuildRequires:  python-oslo.log >= 3.11.0
+BuildRequires:  python-oslo.log >= 1.14.0
 BuildRequires:  python-oslo.middleware >= 3.0.0
 BuildRequires:  python-oslo.serialization >= 1.10.0
 BuildRequires:  python-oslo.service >= 1.10.0
@@ -76,7 +76,7 @@
 Requires:       python-oslo.config >= 3.14.0
 Requires:       python-oslo.context >= 2.9.0
 Requires:       python-oslo.i18n >= 2.1.0
-Requires:       python-oslo.log >= 3.11.0
+Requires:       python-oslo.log >= 1.14.0
 Requires:       python-oslo.middleware >= 3.0.0
 Requires:       python-oslo.serialization >= 1.10.0
 Requires:       python-oslo.service >= 1.10.0
@@ -96,7 +96,7 @@
 Summary:        Documentation for OpenStack messaging library
 Group:          Development/Languages/Python
 BuildRequires:  python-Sphinx
-BuildRequires:  python-oslosphinx >= 4.7.0
+BuildRequires:  python-oslosphinx >= 2.5.0
 
 %description doc
 The Oslo messaging API supports RPC and notifications over a number

++++++ _service ++++++
--- /var/tmp/diff_new_pack.ePLKFO/_old  2016-12-04 15:08:26.000000000 +0100
+++ /var/tmp/diff_new_pack.ePLKFO/_new  2016-12-04 15:08:26.000000000 +0100
@@ -1,8 +1,8 @@
 <services>
   <service mode="disabled" name="renderspec">
-    <param 
name="input-template">https://raw.githubusercontent.com/openstack/rpm-packaging/master/openstack/oslo.messaging/oslo.messaging.spec.j2</param>
+    <param 
name="input-template">https://raw.githubusercontent.com/openstack/rpm-packaging/stable/newton/openstack/oslo.messaging/oslo.messaging.spec.j2</param>
     <param name="output-name">python-oslo.messaging.spec</param>
-    <param 
name="requirements">https://raw.githubusercontent.com/openstack/rpm-packaging/master/global-requirements.txt</param>
+    <param 
name="requirements">https://raw.githubusercontent.com/openstack/rpm-packaging/stable/newton/global-requirements.txt</param>
   </service>
   <service mode="disabled" name="download_files">
     <param name="changesgenerate">enable</param>

++++++ oslo.messaging-5.10.0.tar.gz -> oslo.messaging-5.10.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oslo.messaging-5.10.0/ChangeLog 
new/oslo.messaging-5.10.1/ChangeLog
--- old/oslo.messaging-5.10.0/ChangeLog 2016-08-25 14:01:04.000000000 +0200
+++ new/oslo.messaging-5.10.1/ChangeLog 2016-11-22 12:50:55.000000000 +0100
@@ -1,6 +1,15 @@
 CHANGES
 =======
 
+5.10.1
+------
+
+* rabbit: on reconnect set socket timeout after channel is set
+* Updated from global requirements
+* rabbit: Avoid busy loop on epoll_wait with heartbeat+eventlet
+* Fix consuming from unbound reply queue
+* Update .gitreview for stable/newton
+
 5.10.0
 ------
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oslo.messaging-5.10.0/PKG-INFO 
new/oslo.messaging-5.10.1/PKG-INFO
--- old/oslo.messaging-5.10.0/PKG-INFO  2016-08-25 14:01:04.000000000 +0200
+++ new/oslo.messaging-5.10.1/PKG-INFO  2016-11-22 12:50:55.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: oslo.messaging
-Version: 5.10.0
+Version: 5.10.1
 Summary: Oslo Messaging API
 Home-page: https://wiki.openstack.org/wiki/Oslo#oslo.messaging
 Author: OpenStack
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/oslo.messaging-5.10.0/oslo.messaging.egg-info/PKG-INFO 
new/oslo.messaging-5.10.1/oslo.messaging.egg-info/PKG-INFO
--- old/oslo.messaging-5.10.0/oslo.messaging.egg-info/PKG-INFO  2016-08-25 
14:01:04.000000000 +0200
+++ new/oslo.messaging-5.10.1/oslo.messaging.egg-info/PKG-INFO  2016-11-22 
12:50:55.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: oslo.messaging
-Version: 5.10.0
+Version: 5.10.1
 Summary: Oslo Messaging API
 Home-page: https://wiki.openstack.org/wiki/Oslo#oslo.messaging
 Author: OpenStack
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/oslo.messaging-5.10.0/oslo.messaging.egg-info/pbr.json 
new/oslo.messaging-5.10.1/oslo.messaging.egg-info/pbr.json
--- old/oslo.messaging-5.10.0/oslo.messaging.egg-info/pbr.json  2016-08-25 
14:01:04.000000000 +0200
+++ new/oslo.messaging-5.10.1/oslo.messaging.egg-info/pbr.json  2016-11-22 
12:50:55.000000000 +0100
@@ -1 +1 @@
-{"git_version": "4f8fcb3", "is_release": true}
\ No newline at end of file
+{"is_release": true, "git_version": "cc1ec4e"}
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/oslo.messaging-5.10.0/oslo.messaging.egg-info/requires.txt 
new/oslo.messaging-5.10.1/oslo.messaging.egg-info/requires.txt
--- old/oslo.messaging-5.10.0/oslo.messaging.egg-info/requires.txt      
2016-08-25 14:01:04.000000000 +0200
+++ new/oslo.messaging-5.10.1/oslo.messaging.egg-info/requires.txt      
2016-11-22 12:50:55.000000000 +0100
@@ -17,7 +17,7 @@
 WebOb>=1.2.3
 PyYAML>=3.1.0
 amqp<2.0,>=1.4.0
-kombu>=3.0.25
+kombu!=4.0.0,>=3.0.25
 pika>=0.10.0
 pika-pool>=0.1.3
 futures>=3.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/oslo.messaging-5.10.0/oslo_messaging/_drivers/impl_rabbit.py 
new/oslo.messaging-5.10.1/oslo_messaging/_drivers/impl_rabbit.py
--- old/oslo.messaging-5.10.0/oslo_messaging/_drivers/impl_rabbit.py    
2016-08-25 13:59:20.000000000 +0200
+++ new/oslo.messaging-5.10.1/oslo_messaging/_drivers/impl_rabbit.py    
2016-11-22 12:49:09.000000000 +0100
@@ -277,6 +277,7 @@
                                                     rabbit_queue_ttl)
 
         self.queue = None
+        self._declared_on = None
         self.exchange = kombu.entity.Exchange(
             name=exchange_name,
             type=type,
@@ -285,6 +286,7 @@
 
     def declare(self, conn):
         """Re-declare the queue after a rabbit (re)connect."""
+
         self.queue = kombu.entity.Queue(
             name=self.queue_name,
             channel=conn.channel,
@@ -308,17 +310,41 @@
                 self.queue.declare()
             else:
                 raise
+        self._declared_on = conn.channel
 
-    def consume(self, tag):
+    def consume(self, conn, tag):
         """Actually declare the consumer on the amqp channel.  This will
         start the flow of messages from the queue.  Using the
         Connection.consume() will process the messages,
         calling the appropriate callback.
         """
 
-        self.queue.consume(callback=self._callback,
-                           consumer_tag=six.text_type(tag),
-                           nowait=self.nowait)
+        # Ensure we are on the correct channel before consuming
+        if conn.channel != self._declared_on:
+            self.declare(conn)
+        try:
+            self.queue.consume(callback=self._callback,
+                               consumer_tag=six.text_type(tag),
+                               nowait=self.nowait)
+        except conn.connection.channel_errors as exc:
+            # We retries once because of some races that we can
+            # recover before informing the deployer
+            # bugs.launchpad.net/oslo.messaging/+bug/1581148
+            # bugs.launchpad.net/oslo.messaging/+bug/1609766
+            # bugs.launchpad.net/neutron/+bug/1318721
+
+            # At any channel error, the RabbitMQ closes
+            # the channel, but the amqp-lib quietly re-open
+            # it. So, we must reset all tags and declare
+            # all consumers again.
+            conn._new_tags = set(conn._consumers.values())
+            if exc.code == 404:
+                self.declare(conn)
+                self.queue.consume(callback=self._callback,
+                                   consumer_tag=six.text_type(tag),
+                                   nowait=self.nowait)
+            else:
+                raise
 
     def cancel(self, tag):
         LOG.trace('ConsumerBase.cancel: canceling %s', tag)
@@ -751,11 +777,8 @@
             """Callback invoked when the kombu reconnects and creates
             a new channel, we use it the reconfigure our consumers.
             """
-
-            self.set_transport_socket_timeout()
             self._set_current_channel(new_channel)
-            for consumer in self._consumers:
-                consumer.declare(self)
+            self.set_transport_socket_timeout()
 
             LOG.info(_LI('[%(connection_id)s] Reconnected to AMQP server on '
                          '%(hostname)s:%(port)s via [%(transport)s] client'
@@ -832,6 +855,8 @@
             if self.purpose == rpc_common.PURPOSE_LISTEN:
                 self._set_qos(new_channel)
             self._producer = kombu.messaging.Producer(new_channel)
+            for consumer in self._consumers:
+                consumer.declare(self)
 
     def _set_qos(self, channel):
         """Set QoS prefetch count on the channel"""
@@ -939,7 +964,7 @@
 
     def _heartbeat_start(self):
         if self._heartbeat_supported_and_enabled():
-            self._heartbeat_exit_event = threading.Event()
+            self._heartbeat_exit_event = _utils.Event()
             self._heartbeat_thread = threading.Thread(
                 target=self._heartbeat_thread_job)
             self._heartbeat_thread.daemon = True
@@ -1042,31 +1067,11 @@
             if not self.connection.connected:
                 raise self.connection.recoverable_connection_errors[0]
 
-            consume_max_retries = 2
-            while self._new_tags and consume_max_retries:
+            while self._new_tags:
                 for consumer, tag in self._consumers.items():
                     if tag in self._new_tags:
-                        try:
-                            consumer.consume(tag=tag)
-                            self._new_tags.remove(tag)
-                        except self.connection.channel_errors as exc:
-                            # NOTE(kbespalov): during the interval between
-                            # a queue declaration and consumer declaration
-                            # the queue can disappear. In this case
-                            # we must redeclare queue and try to re-consume.
-                            # More details is here:
-                            # bugs.launchpad.net/oslo.messaging/+bug/1581148
-                            if exc.code == 404 and consume_max_retries:
-                                consumer.declare(self)
-                                # NOTE(kbespalov): the broker closes a channel
-                                # at any channel error. The py-amqp catches
-                                # this situation and re-open a new channel.
-                                # So, we must re-declare all consumers again.
-                                self._new_tags = set(self._consumers.values())
-                                consume_max_retries -= 1
-                                break
-                            else:
-                                raise
+                        consumer.consume(self, tag=tag)
+                        self._new_tags.remove(tag)
 
             poll_timeout = (self._poll_timeout if timeout is None
                             else min(timeout, self._poll_timeout))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oslo.messaging-5.10.0/oslo_messaging/_utils.py 
new/oslo.messaging-5.10.1/oslo_messaging/_utils.py
--- old/oslo.messaging-5.10.0/oslo_messaging/_utils.py  2016-08-25 
13:59:20.000000000 +0200
+++ new/oslo.messaging-5.10.1/oslo_messaging/_utils.py  2016-11-22 
12:49:09.000000000 +0100
@@ -15,6 +15,11 @@
 
 import threading
 
+from oslo_utils import eventletutils
+from oslo_utils import importutils
+
+_eventlet = importutils.try_import('eventlet')
+
 
 def version_is_compatible(imp_version, version):
     """Determine whether versions are compatible.
@@ -80,3 +85,38 @@
 
     def __exit__(self, type, value, traceback):
         self.release()
+
+
+class _Event(object):
+    """A class that provides consistent eventlet/threading Event API.
+
+    This wraps the eventlet.event.Event class to have the same API as
+    the standard threading.Event object.
+    """
+    def __init__(self, *args, **kwargs):
+        self.clear()
+
+    def clear(self):
+        self._set = False
+        self._event = _eventlet.event.Event()
+
+    def is_set(self):
+        return self._set
+
+    isSet = is_set
+
+    def set(self):
+        self._set = True
+        self._event.send(True)
+
+    def wait(self, timeout=None):
+        with _eventlet.timeout.Timeout(timeout, False):
+            self._event.wait()
+        return self.is_set()
+
+
+def Event():
+    if eventletutils.is_monkey_patched("thread"):
+        return _Event()
+    else:
+        return threading.Event()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/oslo.messaging-5.10.0/oslo_messaging/tests/test_utils.py 
new/oslo.messaging-5.10.1/oslo_messaging/tests/test_utils.py
--- old/oslo.messaging-5.10.0/oslo_messaging/tests/test_utils.py        
2016-08-25 13:59:20.000000000 +0200
+++ new/oslo.messaging-5.10.1/oslo_messaging/tests/test_utils.py        
2016-11-22 12:49:09.000000000 +0100
@@ -13,9 +13,13 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+import threading
+
 from oslo_messaging._drivers import common
 from oslo_messaging import _utils as utils
 from oslo_messaging.tests import utils as test_utils
+
+import six
 from six.moves import mock
 
 
@@ -97,3 +101,27 @@
         remaining = t.check_return(callback, 1, a='b')
         self.assertEqual(0, remaining)
         callback.assert_called_once_with(1, a='b')
+
+
+class EventCompatTestCase(test_utils.BaseTestCase):
+    @mock.patch('oslo_messaging._utils._Event.clear')
+    def test_event_api_compat(self, mock_clear):
+        with mock.patch('oslo_utils.eventletutils.is_monkey_patched',
+                        return_value=True):
+            e_event = utils.Event()
+        self.assertIsInstance(e_event, utils._Event)
+
+        with mock.patch('oslo_utils.eventletutils.is_monkey_patched',
+                        return_value=False):
+            t_event = utils.Event()
+        if six.PY3:
+            t_event_cls = threading.Event
+        else:
+            t_event_cls = threading._Event
+        self.assertIsInstance(t_event, t_event_cls)
+
+        public_methods = [m for m in dir(t_event) if not m.startswith("_") and
+                          callable(getattr(t_event, m))]
+
+        for method in public_methods:
+            self.assertTrue(hasattr(e_event, method))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oslo.messaging-5.10.0/releasenotes/source/conf.py 
new/oslo.messaging-5.10.1/releasenotes/source/conf.py
--- old/oslo.messaging-5.10.0/releasenotes/source/conf.py       2016-08-25 
13:59:20.000000000 +0200
+++ new/oslo.messaging-5.10.1/releasenotes/source/conf.py       2016-11-22 
12:49:09.000000000 +0100
@@ -274,3 +274,6 @@
 
 # If true, do not generate a @detailmenu in the "Top" node's menu.
 # texinfo_no_detailmenu = False
+
+# -- Options for Internationalization output ------------------------------
+locale_dirs = ['locale/']
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/oslo.messaging-5.10.0/requirements.txt 
new/oslo.messaging-5.10.1/requirements.txt
--- old/oslo.messaging-5.10.0/requirements.txt  2016-08-25 13:59:20.000000000 
+0200
+++ new/oslo.messaging-5.10.1/requirements.txt  2016-11-22 12:49:09.000000000 
+0100
@@ -35,7 +35,7 @@
 # rabbit driver is the default
 # we set the amqp version to ensure heartbeat works
 amqp<2.0,>=1.4.0 # LGPL
-kombu>=3.0.25 # BSD
+kombu!=4.0.0,>=3.0.25 # BSD
 pika>=0.10.0 # BSD
 pika-pool>=0.1.3 # BSD
 


Reply via email to