None image.size value crashes on get_sample
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ceilometer |
Fix Released
|
High
|
Igor Degtiarov | ||
Kilo |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Using glanceclient one could create an empty image so sample image.size will contain None value.
>>> image = glance.
>>>
>>> image
{u'status': u'queued', u'tags': [], u'container_
u'size': None,
u'name': u'test', u'checksum': None, u'created_at': u'2015-
That is not appropriate when we are talking about metrics and will crash get_sample function on MongoDB and HBase backends because we explicitly change type of volume to float (see patch https:/
Changed in ceilometer: | |
status: | New → In Progress |
importance: | Undecided → High |
milestone: | none → liberty-3 |
Changed in ceilometer: | |
status: | Fix Committed → Fix Released |
Changed in ceilometer: | |
milestone: | liberty-3 → 5.0.0 |
I see two ways for fixing:
Add default value for 'counter_volume' field, 0 --- looks like the most suitable for None, if we are talking about metric
Or check for not None counter_volume on writing data into database to exclude None metrics from storage.
As for me second way looks better.