network notifications throwing keyerror if associate a floatingip to a server

Bug #1325172 reported by Liusheng
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ceilometer
Fix Released
High
Liusheng
Icehouse
Fix Committed
High
Eoghan Glynn

Bug Description

steps to reproduce:

1. create a floatingip
2. use "nova floating-ip-associate" to associate the floatingip to a server

A keyerror will be thrown , the traceback in ceilometer-agent-notification.log:

2014-05-31 15:19:43.501 18053 INFO ceilometer.network.notifications [-] network notification {'_context_roles': [u'_member_', u'admin', u'heat_stack_owner'], '_context_request_id': u'req-bd5ed336-242f-4705-836e-8e8f3d0d1ced', '_context_read_deleted': u'no', 'event_type': u'floatingip.update.start', '_context_user_name': u'admin', '_context_project_name': u'admin', 'timestamp': u'2014-05-31 07:19:43.463101', '_context_tenant_id': u'9fc714821a3747c8bc4e3a9bfbe82732', '_context_tenant_name': u'admin', '_context_tenant': u'9fc714821a3747c8bc4e3a9bfbe82732', 'message_id': u'0ab6d71f-ba0a-4501-86fe-6cc20521ef5a', 'priority': 'info', '_context_is_admin': True, '_context_project_id': u'9fc714821a3747c8bc4e3a9bfbe82732', '_context_timestamp': u'2014-05-31 07:19:43.460767', '_context_user': u'6ca7b13b33e4425cae0b85e2cf93d9a1', '_context_user_id': u'6ca7b13b33e4425cae0b85e2cf93d9a1', 'publisher_id': u'network.devstack', 'payload': {u'id': u'64262b2a-8f5d-4ade-9405-0cbdd03c1555', u'floatingip': {u'port_id': u'8ab815c8-03cc-4b45-a673-79bdd0c258f2'}}}
2014-05-31 15:19:43.502 18053 ERROR oslo.messaging.notify.dispatcher [-] Exception during message handling
2014-05-31 15:19:43.502 18053 TRACE oslo.messaging.notify.dispatcher Traceback (most recent call last):
2014-05-31 15:19:43.502 18053 TRACE oslo.messaging.notify.dispatcher File "/usr/local/lib/python2.7/dist-packages/oslo/messaging/notify/dispatcher.py", line 85, in _dispatch_and_handle_error
2014-05-31 15:19:43.502 18053 TRACE oslo.messaging.notify.dispatcher return self._dispatch(incoming.ctxt, incoming.message)
2014-05-31 15:19:43.502 18053 TRACE oslo.messaging.notify.dispatcher File "/usr/local/lib/python2.7/dist-packages/oslo/messaging/notify/dispatcher.py", line 121, in _dispatch
2014-05-31 15:19:43.502 18053 TRACE oslo.messaging.notify.dispatcher metadata)
2014-05-31 15:19:43.502 18053 TRACE oslo.messaging.notify.dispatcher File "/opt/stack/ceilometer/ceilometer/plugin.py", line 107, in info
2014-05-31 15:19:43.502 18053 TRACE oslo.messaging.notify.dispatcher self.to_samples_and_publish(context.get_admin_context(), notification)
2014-05-31 15:19:43.502 18053 TRACE oslo.messaging.notify.dispatcher File "/opt/stack/ceilometer/ceilometer/plugin.py", line 125, in to_samples_and_publish
2014-05-31 15:19:43.502 18053 TRACE oslo.messaging.notify.dispatcher p(list(self.process_notification(notification)))
2014-05-31 15:19:43.502 18053 TRACE oslo.messaging.notify.dispatcher File "/opt/stack/ceilometer/ceilometer/network/notifications.py", line 93, in process_notification
2014-05-31 15:19:43.502 18053 TRACE oslo.messaging.notify.dispatcher resource_id=message['payload']['id'],
2014-05-31 15:19:43.502 18053 TRACE oslo.messaging.notify.dispatcher KeyError: 'id'

Liusheng (liusheng)
Changed in ceilometer:
assignee: nobody → Liusheng (liusheng)
Eoghan Glynn (eglynn)
Changed in ceilometer:
status: New → Triaged
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ceilometer (master)

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

Changed in ceilometer:
status: Triaged → In Progress
Changed in ceilometer:
assignee: Liusheng (liusheng) → gordon chung (chungg)
Eoghan Glynn (eglynn)
Changed in ceilometer:
milestone: none → juno-3
Changed in ceilometer:
assignee: gordon chung (chungg) → Liusheng (liusheng)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ceilometer (master)

Reviewed: https://review.openstack.org/97413
Committed: https://git.openstack.org/cgit/openstack/ceilometer/commit/?id=658b89941299370db67b34e8b26750f00c013ca9
Submitter: Jenkins
Branch: master

commit 658b89941299370db67b34e8b26750f00c013ca9
Author: liu-sheng <email address hidden>
Date: Tue Jun 3 14:23:35 2014 +0800

    Fix listener for update.start notifications

    When listening for update.start, ceilometer-notification-agent
    will raise a KeyError exception. This is because, the "id" in notification
    message is in message['payload'] not the message['payload'][resource].

    Change-Id: I6dd56fbf31c29e26670068004f6fc935b91266f0
    Closes-Bug: #1325172

Changed in ceilometer:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in ceilometer:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in ceilometer:
milestone: juno-3 → 2014.2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ceilometer (stable/icehouse)

Fix proposed to branch: stable/icehouse
Review: https://review.openstack.org/130341

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ceilometer (stable/icehouse)

Reviewed: https://review.openstack.org/130341
Committed: https://git.openstack.org/cgit/openstack/ceilometer/commit/?id=28f502751fe1f2ca9646f26f7a10a718ecf4ee2b
Submitter: Jenkins
Branch: stable/icehouse

commit 28f502751fe1f2ca9646f26f7a10a718ecf4ee2b
Author: Mehdi Abaakouk <email address hidden>
Date: Fri Jul 25 17:26:49 2014 +0200

    Fix listener for update.start notifications

    When listening for update.start, ceilometer-notification-agent
    will raise a KeyError exception. This is because, the "id" in notification
    message is in message['payload'] not the message['payload'][resource].

    Backport note, squashed with dependent patch:

      Don't override the original notification message
      (commit 4292ebd9d409a09b1e1f276ed447c82317cd14de)

    Change-Id: I6dd56fbf31c29e26670068004f6fc935b91266f0
    (cherry picked from commit 658b89941299370db67b34e8b26750f00c013ca9)
    Closes-Bug: #1325172

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.