Collector does not requeue sample when requeue_sample_on_dispatcher_error is enabled

Bug #1433881 reported by Rohit Jaiswal
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ceilometer
Fix Released
Medium
Rohit Jaiswal

Bug Description

Added a collector section to ceilometer.conf:

[collector]
requeue_sample_on_dispatcher_error = True

When a sample is picked up by collector and dispatched to the database storage driver and an exception reported by the storage layer i.e a deadlock or some uncaught DBError, the dispatcher does not propagate the reported exception to the collector. The collector fails to requeue the sample since the dispatcher and/or stevedore does not propagate it to the collector.

The database dispatcher (record_metering_data) should raise the exception in addition to logging the error.

Code snippet from ceilometer/dispatcher/database.py:

def record_metering_data(self, data):
   ...
   ...
   for meter in data:
   ...
   try:
        ...
        self.meter_conn.record_metering_data(meter)
   except Exception as err:
        LOG.exception(_('Failed to record metering data: %s'),
                        err)

In above snippet of code, the exception is being logged and not being raised again.

Stevedore (NamedExtensionManager) should be setup to propagate exceptions reported in plugin extensions back to the caller using propagate_map_exceptions = True

Changed in ceilometer:
assignee: nobody → Rohit Jaiswal (rohit-jaiswal-3)
summary: Collector does not requeue sample when
- requeue_sample_on_dispatcher_error is True
+ requeue_sample_on_dispatcher_error is enabled
description: updated
description: updated
description: updated
gordon chung (chungg)
Changed in ceilometer:
status: New → Triaged
description: updated
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/165960

Changed in ceilometer:
status: Triaged → In Progress
gordon chung (chungg)
Changed in ceilometer:
importance: Undecided → Medium
gordon chung (chungg)
Changed in ceilometer:
milestone: none → kilo-rc1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ceilometer (master)

Reviewed: https://review.openstack.org/165960
Committed: https://git.openstack.org/cgit/openstack/ceilometer/commit/?id=7e5a6711ceb9f75bd4ebd2579fe97167d32351b5
Submitter: Jenkins
Branch: master

commit 7e5a6711ceb9f75bd4ebd2579fe97167d32351b5
Author: Rohit Jaiswal <email address hidden>
Date: Thu Mar 19 11:28:20 2015 -0700

    Enable collector to requeue samples when enabled

    If an exception is reported by the storage layer,
    the dispatcher logs the error but does not
    propagate it. Stevedore plugin framework also does
    not propagate the exception back to the caller.

    The sample is not requeued since collector does
    not get the exception and returns a Handled
    NotificationResult. This fix raises the exception
    in the database dispatcher and enables Stevedore
    to propagate exceptions to the collector.

    Change-Id: I341ad92df050bf0f474b07c3f27c68cdb4f4e59b
    Closes-Bug: 1433881

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: kilo-rc1 → 2015.1.0
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.