Powervm driver implementation of macs_for_instance fails when qpid used as amqp provider

Bug #1131035 reported by David Peraza
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Undecided
Russell Bryant

Bug Description

Qpid does not support encoding for set data structure, see qpid/codec010.py. Powervm driver returns a set for macs_for_instance implementation braking deploy flow. Suggest changing to return list instead of a set. It seems to work on my dev env. I can provide a fix if assigned to me.

David Peraza (dperaza)
Changed in nova:
assignee: nobody → David Peraza (dperaza)
Changed in nova:
status: New → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

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

Changed in nova:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Changed in nova:
assignee: David Peraza (dperaza) → Russell Bryant (russellb)
Revision history for this message
David Peraza (dperaza) wrote :
Download full text (6.1 KiB)

This is the trace we get with the encoding issue:

2013-02-18 13:28:38.708 ERROR nova.scheduler.filter_scheduler [req-6b579a08-f2a5-447d-a881-9eec0d6ecce9 7e9ee04cf6fa40bf8ef3f78757356483 9b2c4c250aba4fb8b7387b74d60c6802] [instance: 7b9c4be0-c207-45d8-af6a-8ff8b4a1479e] Error from last host: vs347.rch.kstart.ibm.com (node olyblade01.rch.stglabs.ibm.com): [u'Traceback (most recent call last):\n', u' File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 710, in _run_instance\n requested_networks, macs)\n', u' File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 957, in _allocate_network\n macs=macs, conductor_api=self.conductor_api)\n', u' File "/usr/lib/python2.6/site-packages/nova/network/api.py", line 88, in wrapped\n return func(self, context, *args, **kwargs)\n', u' File "/usr/lib/python2.6/site-packages/nova/network/api.py", line 45, in wrapper\n res = f(self, context, *args, **kwargs)\n', u' File "/usr/lib/python2.6/site-packages/nova/network/api.py", line 269, in allocate_for_instance\n nw_info = self.network_rpcapi.allocate_for_instance(context, **args)\n', u' File "/usr/lib/python2.6/site-packages/nova/network/rpcapi.py", line 168, in allocate_for_instance\n topic=topic, version=\'1.8\')\n', u' File "/usr/lib/python2.6/site-packages/nova/openstack/common/rpc/proxy.py", line 80, in call\n return rpc.call(context, self._get_topic(topic), msg, timeout)\n', u' File "/usr/lib/python2.6/site-packages/nova/openstack/common/rpc/__init__.py", line 139, in call\n return _get_impl().call(CONF, context, topic, msg, timeout)\n', u' File "/usr/lib/python2.6/site-packages/nova/openstack/common/rpc/impl_qpid.py", line 582, in call\n rpc_amqp.get_connection_pool(conf, Connection))\n', u' File "/usr/lib/python2.6/site-packages/nova/openstack/common/rpc/amqp.py", line 377, in call\n rv = multicall(conf, context, topic, msg, timeout, connection_pool)\n', u' File "/usr/lib/python2.6/site-packages/nova/openstack/common/rpc/amqp.py", line 371, in multicall\n conn.topic_send(topic, rpc_common.serialize_msg(msg), timeout)\n', u' File "/usr/lib/python2.6/site-packages/nova/openstack/common/rpc/impl_qpid.py", line 503, in topic_send\n self.publisher_send(TopicPublisher, topic, qpid_message)\n', u' File "/usr/lib/python2.6/site-packages/nova/openstack/common/rpc/impl_qpid.py", line 464, in publisher_send\n return self.ensure(_connect_error, _publisher_send)\n', u' File "/usr/lib/python2.6/site-packages/nova/openstack/common/rpc/impl_qpid.py", line 375, in ensure\n return method(*args, **kwargs)\n', u' File "/usr/lib/python2.6/site-packages/nova/openstack/common/rpc/impl_qpid.py", line 462, in _publisher_send\n publisher.send(msg)\n', u' File "/usr/lib/python2.6/site-packages/nova/openstack/common/rpc/impl_qpid.py", line 233, in send\n self.sender.send(msg)\n', u' File "<string>", line 6, in send\n', u' File "/usr/lib/python2.6/site-packages/qpid/messaging/endpoints.py", line 874, in send\n self.sync()\n', u' File "<string>", line 6, in sync\n', u' File "/usr/lib/python2.6/site-packages/qpid/messaging/endpoints.py", line 885, in sync\n if not self._ewait(lam...

Read more...

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/22723
Committed: http://github.com/openstack/nova/commit/f4f6464f58482fe0c1193cadddb2db56dc4a2434
Submitter: Jenkins
Branch: master

commit f4f6464f58482fe0c1193cadddb2db56dc4a2434
Author: Russell Bryant <email address hidden>
Date: Fri Feb 22 13:19:42 2013 -0500

    Ensure macs can be serialized.

    This patch uses to_primitive() to ensure that the macs argument to the
    rpcapi method allocate_for_instance() can be serialized by rpc drivers.
    Specifically, the powervm driver uses a set() here, and that will cause
    breakage in non-kombu drivers.

    Fix bug 1131035.

    Change-Id: I5729c5854799e49c6598e4dd2a4da487598307f1

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → grizzly-rc1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: grizzly-rc1 → 2013.1
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.