[murano-agent] python version should refer to "headers" attribute instead of "header" for message object

Bug #1315571 reported by Ankur Rishi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Murano
Fix Released
Medium
Ankur Rishi

Bug Description

When the python version of the agent is deployed on a VM, I get the following error:

2014-05-02 22:25:58.873 3715 DEBUG amqp [-] Open OK! _open_ok /usr/local/lib/python2.7/dist-packages/amqp/connection.py:637
2014-05-02 22:25:58.877 3715 DEBUG amqp [-] using channel_id: 1 __init__ /usr/local/lib/python2.7/dist-packages/amqp/channel.py:80
2014-05-02 22:25:58.885 3715 DEBUG amqp [-] Channel open _open_ok /usr/local/lib/python2.7/dist-packages/amqp/channel.py:438
2014-05-02 22:25:58.889 3715 DEBUG amqp [-] using channel_id: 2 __init__ /usr/local/lib/python2.7/dist-packages/amqp/channel.py:80
2014-05-02 22:25:58.897 3715 DEBUG amqp [-] Channel open _open_ok /usr/local/lib/python2.7/dist-packages/amqp/channel.py:438
2014-05-02 22:25:58.917 3715 ERROR murano-common.messaging [-]
2014-05-02 22:25:58.925 3715 DEBUG amqp [-] Closed channel #2 _do_close /usr/local/lib/python2.7/dist-packages/amqp/channel.py:104
2014-05-02 22:25:58.933 3715 DEBUG amqp [-] Closed channel #1 _do_close /usr/local/lib/python2.7/dist-packages/amqp/channel.py:104
2014-05-02 22:25:58.937 3715 WARNING muranoagent.app [-] Communication error
2014-05-02 22:25:58.937 3715 TRACE muranoagent.app Traceback (most recent call last):
2014-05-02 22:25:58.937 3715 TRACE muranoagent.app File "/usr/local/lib/python2.7/dist-packages/muranoagent/app.py", line 123, in _wait_plan
2014-05-02 22:25:58.937 3715 TRACE muranoagent.app msg = subscription.get_message(timeout=5)
2014-05-02 22:25:58.937 3715 TRACE muranoagent.app File "/usr/local/lib/python2.7/dist-packages/muranoagent/common/messaging/subscription.py", line 48, in get_message
2014-05-02 22:25:58.937 3715 TRACE muranoagent.app return message.Message(self._connection, msg_handle)
2014-05-02 22:25:58.937 3715 TRACE muranoagent.app File "/usr/local/lib/python2.7/dist-packages/muranoagent/common/messaging/message.py", line 32, in __init__
2014-05-02 22:25:58.937 3715 TRACE muranoagent.app self.id = message_handle.header.get('message_id')
2014-05-02 22:25:58.937 3715 TRACE muranoagent.app AttributeError: 'Message' object has no attribute 'header'
2014-05-02 22:25:58.937 3715 TRACE muranoagent.app

The Message object is of the class kombu.transport.pyamqp.Message

The requirements.txt file for the python version of the murano-agent requires kombu 2.4.8 or greater, in which there is no "header" attribute for this Message class, but there is a "headers" (with an "s") attribute.

Changed in murano:
assignee: nobody → Ankur Rishi (ankur-rishi)
Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : Fix proposed to murano-agent (master)

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

Changed in murano:
status: New → In Progress
Changed in murano:
milestone: none → 0.5
importance: Undecided → Medium
Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : Fix merged to murano-agent (master)

Reviewed: https://review.openstack.org/91924
Committed: https://git.openstack.org/cgit/stackforge/murano-agent/commit/?id=a9bf46545502afb9991f7ffd65406797b79d1716
Submitter: Jenkins
Branch: master

commit a9bf46545502afb9991f7ffd65406797b79d1716
Author: Ankur Rishi <email address hidden>
Date: Fri May 2 16:46:25 2014 -0700

    Correct murano-agent reference to message headers

    The python-murano agent refers to a 'header'
    attribute when trying to extract the message
    id from the list of headers.

    The message object is of the class
    kombu.transport.pyamqp.Message, which does not
    have a 'header' attribute, but a 'headers'
    attribute.

    The reference needs to be corrected to 'headers'

    Change-Id: Ibf470090e01d159cdfea13d142f6b712c649183a
    Closes-Bug: #1315571

Changed in murano:
status: In Progress → Fix Committed
ruhe (ruhe)
Changed in murano:
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.