← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1275771] Re: Notifications do not work: AttributeError: 'RequestContext' object has no attribute 'iteritems'

 

Julien figured out this was a bug in Nova

We still want to make it easier in oslo.messaging to catch this issue,
though

** Changed in: oslo.messaging
       Status: In Progress => Invalid

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1275771

Title:
  Notifications do not work: AttributeError: 'RequestContext' object has
  no attribute 'iteritems'

Status in OpenStack Compute (Nova):
  In Progress
Status in Messaging API for OpenStack:
  Invalid

Bug description:
  When enabling notification with notification_driver = messaging, I get
  the following:

  
  2014-02-03 14:20:41.152 ERROR oslo.messaging.notify._impl_messaging [-] Could not send notification to notifications. Payload={'priority': 'INFO', '_unique_id': 'da748b32fd144c25adc45ba5b393339d', 'event_type': 'compute.instance.create.end', 'timestamp': '2014-02-03 14:20:41.151419', 'publisher_id': 'compute.devstack', 'payload': {'node': u'devstack', 'state_description': '', 'ramdisk_id': u'37ad58df-c587-4bed-9062-9428ca14eaf0', 'created_at': '2014-02-03 14:20:33+00:00', 'access_ip_v6': None, 'disk_gb': 0, 'availability_zone': u'nova', 'terminated_at': '', 'ephemeral_gb': 0, 'instance_type_id': 6, 'instance_flavor_id': '42', 'image_name': u'cirros-0.3.1-x86_64-uec', 'host': u'devstack', 'fixed_ips': [FixedIP({'version': 4, 'floating_ips': [], 'label': u'private', 'meta': {}, 'address': u'10.0.0.2', 'type': u'fixed'})], 'user_id': u'6bcbc8f54d65473c9a0c4a55f64fb580', 'message': u'Success', 'deleted_at': '', 'reservation_id': u'r-jycyyveh', 'image_ref_url': u'http://162.209.87.220:9292/images/7b8d712a-fb31-43b8-8a05-a74d70fd8a11', 'memory_mb': 64, 'root_gb': 0, 'display_name': u'dwq', 'instance_type': 'm1.nano', 'tenant_id': u'cda1741ff4ef47f48fb3d9d76e302add', 'access_ip_v4': None, 'hostname': u'dwq', 'vcpus': 1, 'instance_id': '272c2ec6-bb98-4e84-9377-84c63c7a9ce9', 'kernel_id': u'5d1a6130-0e6a-4155-9c05-0174a654da68', 'state': u'active', 'image_meta': {u'kernel_id': u'5d1a6130-0e6a-4155-9c05-0174a654da68', u'container_format': u'ami', u'min_ram': u'0', u'ramdisk_id': u'37ad58df-c587-4bed-9062-9428ca14eaf0', u'disk_format': u'ami', u'min_disk': u'0', u'base_image_ref': u'7b8d712a-fb31-43b8-8a05-a74d70fd8a11'}, 'architecture': None, 'os_type': None, 'launched_at': '2014-02-03T14:20:41.070490', 'metadata': {}}, 'message_id': '03b2985a-6bcd-44ff-8303-29618d3c2b01'}
  2014-02-03 14:20:41.152 TRACE oslo.messaging.notify._impl_messaging Traceback (most recent call last):
  2014-02-03 14:20:41.152 TRACE oslo.messaging.notify._impl_messaging   File "/opt/stack/oslo.messaging/oslo/messaging/notify/_impl_messaging.py", line 47, in notify
  2014-02-03 14:20:41.152 TRACE oslo.messaging.notify._impl_messaging     version=self.version)
  2014-02-03 14:20:41.152 TRACE oslo.messaging.notify._impl_messaging   File "/opt/stack/oslo.messaging/oslo/messaging/transport.py", line 93, in _send_notification
  2014-02-03 14:20:41.152 TRACE oslo.messaging.notify._impl_messaging     self._driver.send_notification(target, ctxt, message, version)
  2014-02-03 14:20:41.152 TRACE oslo.messaging.notify._impl_messaging   File "/opt/stack/oslo.messaging/oslo/messaging/_drivers/amqpdriver.py", line 393, in send_notification
  2014-02-03 14:20:41.152 TRACE oslo.messaging.notify._impl_messaging     return self._send(target, ctxt, message, envelope=(version == 2.0))
  2014-02-03 14:20:41.152 TRACE oslo.messaging.notify._impl_messaging   File "/opt/stack/oslo.messaging/oslo/messaging/_drivers/amqpdriver.py", line 362, in _send
  2014-02-03 14:20:41.152 TRACE oslo.messaging.notify._impl_messaging     rpc_amqp.pack_context(msg, context)
  2014-02-03 14:20:41.152 TRACE oslo.messaging.notify._impl_messaging   File "/opt/stack/oslo.messaging/oslo/messaging/_drivers/amqp.py", line 299, in pack_context
  2014-02-03 14:20:41.152 TRACE oslo.messaging.notify._impl_messaging     context_d = six.iteritems(context.to_dict())
  2014-02-03 14:20:41.152 TRACE oslo.messaging.notify._impl_messaging   File "/usr/local/lib/python2.7/dist-packages/six.py", line 484, in iteritems
  2014-02-03 14:20:41.152 TRACE oslo.messaging.notify._impl_messaging     return iter(getattr(d, _iteritems)(**kw))
  2014-02-03 14:20:41.152 TRACE oslo.messaging.notify._impl_messaging AttributeError: 'RequestContext' object has no attribute 'iteritems'
  2014-02-03 14:20:41.152 TRACE oslo.messaging.notify._impl_messaging

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1275771/+subscriptions


References