rabbit: declaring consumers after the consumer loop won't works

Bug #1450342 reported by Mehdi Abaakouk
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
oslo.messaging
Fix Released
Low
Mehdi Abaakouk

Bug Description

Hi,

consuming messages without consumer declared won't works (following backtrace), and also declaring a new consumer after we start the consumer loop doesn't call 'consume' on the new queue.

  File "/home/sileht/workspace/eNovance/os_dev/stack-master/oslo.messaging/tests/drivers/test_impl_rabbit.py", line 92, in test_consume_timeout
    conn.consume(timeout=3)
  File "/home/sileht/workspace/eNovance/os_dev/stack-master/oslo.messaging/oslo_messaging/_drivers/impl_rabbit.py", line 1045, in consume
    error_callback=_error_callback)
  File "/home/sileht/workspace/eNovance/os_dev/stack-master/oslo.messaging/oslo_messaging/_drivers/impl_rabbit.py", line 852, in ensure
    ret, channel = autoretry_method()
  File "/home/sileht/workspace/eNovance/os_dev/stack-master/oslo.messaging/.tox/py27/local/lib/python2.7/site-packages/kombu/connection.py", line 436, in _ensured
    return fun(*args, **kwargs)
  File "/home/sileht/workspace/eNovance/os_dev/stack-master/oslo.messaging/.tox/py27/local/lib/python2.7/site-packages/kombu/connection.py", line 508, in __call__
    return fun(*args, channel=channels[0], **kwargs), channels[0]
  File "/home/sileht/workspace/eNovance/os_dev/stack-master/oslo.messaging/oslo_messaging/_drivers/impl_rabbit.py", line 838, in execute_method
    method()
  File "/home/sileht/workspace/eNovance/os_dev/stack-master/oslo.messaging/oslo_messaging/_drivers/impl_rabbit.py", line 1013, in _consume
    queues_tail = self.consumers[-1] # fanout
IndexError: list index out of range

Cheers,

Mehdi Abaakouk (sileht)
Changed in oslo.messaging:
importance: Undecided → Low
Mehdi Abaakouk (sileht)
Changed in oslo.messaging:
status: New → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to oslo.messaging (master)

Fix proposed to branch: master
Review: https://review.openstack.org/179271

Changed in oslo.messaging:
assignee: nobody → Mehdi Abaakouk (sileht)
status: Confirmed → In Progress
Mehdi Abaakouk (sileht)
Changed in oslo.messaging:
milestone: none → next-liberty
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to oslo.messaging (master)

Reviewed: https://review.openstack.org/179271
Committed: https://git.openstack.org/cgit/openstack/oslo.messaging/commit/?id=2c3c8a3a5523f737773b4c3342ee0417ad708bb4
Submitter: Jenkins
Branch: master

commit 2c3c8a3a5523f737773b4c3342ee0417ad708bb4
Author: Mehdi Abaakouk <email address hidden>
Date: Fri May 1 00:09:18 2015 +0200

    rabbit: fix consumers declaration

    When a consumer is declared after we have started to consume
    amqp, its queue is never consumed.

    This fixes that.

    Closes bug: #1450342

    Change-Id: I9f2e7d83283504dfe762ac88384efde0f7b52d47

Changed in oslo.messaging:
status: In Progress → Fix Committed
Changed in oslo.messaging:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.