NotImplementedError of record_events will break notification-to-sample with mongodb backend

Bug #1320420 reported by Liusheng
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ceilometer
Fix Released
High
Liusheng

Bug Description

If we have configured "store_events" option as "True" and the environment use mongodb as storage backend.
it will raise NotImplementedError, because the implementation of mongodb storage haven't realize the record_events() method.

creating floatingip as examp:

ing event "floatingip.create.end" process_notification /opt/stack/ceilometer/ceilometer/event/endpoint.py:64
[-] Exception during message handling
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/oslo/messaging/notify/dispatcher.py", line 85, in _dispatch_and_handle_error
    return self._dispatch(incoming.ctxt, incoming.message)
  File "/usr/local/lib/python2.7/dist-packages/oslo/messaging/notify/dispatcher.py", line 121, in _dispatch
    metadata)
  File "/opt/stack/ceilometer/ceilometer/event/endpoint.py", line 58, in info
    self.process_notification(notification)
  File "/opt/stack/ceilometer/ceilometer/event/endpoint.py", line 67, in process_notification
    problem_events.extend(dispatcher_ext.obj.record_events(event))
  File "/opt/stack/ceilometer/ceilometer/dispatcher/database.py", line 80, in record_events
    return self.storage_conn.record_events(events)
  File "/opt/stack/ceilometer/ceilometer/storage/base.py", line 315, in record_events
    raise NotImplementedError('Events not implemented.')
NotImplementedError: Events not implemented.

after that, use "ceilometer sample-list -m ip.floating", we can't get the sample from notification about floatingip.

Liusheng (liusheng)
summary: NotImplementedError of record_events will broken notification-to-sample
- with mongodb scenario backend
+ with mongodb backend
Changed in ceilometer:
assignee: nobody → Liusheng (liusheng)
Eoghan Glynn (eglynn)
Changed in ceilometer:
status: New → Triaged
importance: Undecided → High
summary: - NotImplementedError of record_events will broken notification-to-sample
+ NotImplementedError of record_events will break notification-to-sample
with mongodb backend
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/97669

Changed in ceilometer:
status: Triaged → In Progress
Eoghan Glynn (eglynn)
Changed in ceilometer:
milestone: none → juno-1
Revision history for this message
Lianhao Lu (lianhao-lu) wrote :

Forgive my ignorance on oslo.messaging about notification listener. From what I read from the code, it seems that recording the event and storing the samples from the notificaitons are done in different notification endpoints. Why one notification endpoint(eventsNotificationEndpoint)'s failure would affect other endpoints' behavior? Is it the oslo.messaging.notification_listener designed?

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

Reviewed: https://review.openstack.org/97669
Committed: https://git.openstack.org/cgit/openstack/ceilometer/commit/?id=48e30f52d46ce61ca561c271d4c32700a8d27081
Submitter: Jenkins
Branch: master

commit 48e30f52d46ce61ca561c271d4c32700a8d27081
Author: liu-sheng <email address hidden>
Date: Tue Jun 3 17:43:54 2014 +0800

    Fix notification for NotImplemented record_events

    With mongodb as storage backend, notification-to-sample will be broken by
    NotImplementedError of record_events() method if we have set
    "store_events" option as True in ceilometer.conf.

    This patch catch the NotImplementedError and enable the
    notification-to-sample process.

    Change-Id: I7ace5a8581518fa56e58abca2e377b513ff38675
    Closes-Bug: #1320420

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-1 → 2014.2
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.