← 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'

 

Impacts on ceilometer alarm notification also since the oslo-messaging
switch-over:


2014-05-07 11:38:28.365 25696 DEBUG oslo.messaging._drivers.amqp [-] UNIQUE_ID is 68d046edf6614bab854170f81aec72f1. _add_unique_id /usr/lib/python2.7/site-packages/oslo/messaging/_drivers/amqp.py:251
2014-05-07 11:38:28.366 25696 ERROR ceilometer.alarm.evaluator [-] alarm state update failed
2014-05-07 11:38:28.366 25696 TRACE ceilometer.alarm.evaluator Traceback (most recent call last):
2014-05-07 11:38:28.366 25696 TRACE ceilometer.alarm.evaluator   File "/opt/stack/ceilometer/ceilometer/alarm/evaluator/__init__.py", line 79, in _refresh
2014-05-07 11:38:28.366 25696 TRACE ceilometer.alarm.evaluator     self.notifier.notify(alarm, previous, reason, reason_data)
2014-05-07 11:38:28.366 25696 TRACE ceilometer.alarm.evaluator   File "/opt/stack/ceilometer/ceilometer/alarm/rpc.py", line 66, in notify
2014-05-07 11:38:28.366 25696 TRACE ceilometer.alarm.evaluator     'reason_data': reason_data})
2014-05-07 11:38:28.366 25696 TRACE ceilometer.alarm.evaluator   File "/usr/lib/python2.7/site-packages/oslo/messaging/rpc/client.py", line 325, in cast
2014-05-07 11:38:28.366 25696 TRACE ceilometer.alarm.evaluator     self.prepare().cast(ctxt, method, **kwargs)
2014-05-07 11:38:28.366 25696 TRACE ceilometer.alarm.evaluator   File "/usr/lib/python2.7/site-packages/oslo/messaging/rpc/client.py", line 132, in cast
2014-05-07 11:38:28.366 25696 TRACE ceilometer.alarm.evaluator     self.transport._send(self.target, ctxt, msg)
2014-05-07 11:38:28.366 25696 TRACE ceilometer.alarm.evaluator   File "/usr/lib/python2.7/site-packages/oslo/messaging/transport.py", line 90, in _send
2014-05-07 11:38:28.366 25696 TRACE ceilometer.alarm.evaluator     timeout=timeout)
2014-05-07 11:38:28.366 25696 TRACE ceilometer.alarm.evaluator   File "/usr/lib/python2.7/site-packages/oslo/messaging/_drivers/amqpdriver.py", line 386, in send
2014-05-07 11:38:28.366 25696 TRACE ceilometer.alarm.evaluator     return self._send(target, ctxt, message, wait_for_reply, timeout)
2014-05-07 11:38:28.366 25696 TRACE ceilometer.alarm.evaluator   File "/usr/lib/python2.7/site-packages/oslo/messaging/_drivers/amqpdriver.py", line 356, in _send
2014-05-07 11:38:28.366 25696 TRACE ceilometer.alarm.evaluator     rpc_amqp.pack_context(msg, context)
2014-05-07 11:38:28.366 25696 TRACE ceilometer.alarm.evaluator   File "/usr/lib/python2.7/site-packages/oslo/messaging/_drivers/amqp.py", line 212, in pack_context
2014-05-07 11:38:28.366 25696 TRACE ceilometer.alarm.evaluator     context_d = six.iteritems(context.to_dict())
2014-05-07 11:38:28.366 25696 TRACE ceilometer.alarm.evaluator   File "/usr/lib/python2.7/site-packages/six.py", line 498, in iteritems
2014-05-07 11:38:28.366 25696 TRACE ceilometer.alarm.evaluator     return iter(getattr(d, _iteritems)(**kw))
2014-05-07 11:38:28.366 25696 TRACE ceilometer.alarm.evaluator AttributeError: 'RequestContext' object has no attribute 'iteritems'
2014-05-07 11:38:28.366 25696 TRACE ceilometer.alarm.evaluator 


** Also affects: ceilometer
   Importance: Undecided
       Status: New

** Changed in: ceilometer
    Milestone: None => juno-1

** Changed in: ceilometer
   Importance: Undecided => Critical

-- 
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 Telemetry (Ceilometer):
  New
Status in OpenStack Compute (Nova):
  Fix Released
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/ceilometer/+bug/1275771/+subscriptions


References