network statistics driver should check if samples is not None

Bug #1304327 reported by Sylvain Afchain
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ceilometer
Fix Released
Low
Sylvain Afchain

Bug Description

The method get_samples in this file ceilometer/network/statistics/__init__.py doesn't check that the samples returned are not None, but it could be since the docstring says that method get_sample_data can return None in the case of there is no meter for the meter_name specified (get_sample_data in ceilometer/network/statistics/driver.py)

Changed in ceilometer:
assignee: nobody → Sylvain Afchain (sylvain-afchain)
summary: - network statistic driver should if samples is not None
+ network statistics driver should if samples is not None
summary: - network statistics driver should if samples is not None
+ network statistics driver should check if samples is not None
Revision history for this message
Ildiko Vancsa (ildiko-vancsa) wrote :

Initial patch for fixing this bug: https://review.openstack.org/#/c/85999/2

Revision history for this message
Ildiko Vancsa (ildiko-vancsa) wrote :

Hi Sylvain,

Will you continue to work on this patch?

Best Regards,
Ildiko

Changed in ceilometer:
importance: Undecided → Low
Changed in ceilometer:
status: New → In Progress
Revision history for this message
Sylvain Afchain (sylvain-afchain) wrote :

Hi,

Just submitted another patch-set

Regars,
Sylvain

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

Reviewed: https://review.openstack.org/85999
Committed: https://git.openstack.org/cgit/openstack/ceilometer/commit/?id=91930ca89c6ae6cb583bd63ebf7f153e0fd9fe54
Submitter: Jenkins
Branch: master

commit 91930ca89c6ae6cb583bd63ebf7f153e0fd9fe54
Author: Sylvain Afchain <email address hidden>
Date: Sat Apr 5 08:19:42 2014 +0200

    Check if samples returned by get_sample_data are not None

    Check if samples returned by the method get_sample_data
    of a network statistics driver are not None.
    As described in the docstring of the abstract method
    if a driver is not able to return samples for a meter_name
    it has to return None.

    Closes-bug: #1304327
    Change-Id: Id4b2000adc20078631cb8ce1ed7f84fce1a3165d

Changed in ceilometer:
status: In Progress → Fix Committed
Eoghan Glynn (eglynn)
Changed in ceilometer:
milestone: none → juno-1
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.