Comment 3 for bug 1372791

Revision history for this message
Vincent Hou (houshengbo) wrote :

Hi Daniele,
I think I have found the root cause for this issue.
In cinder/volume/utils.py, the method _usage_from_volume is supposed to return the information reported to ceilometer for the volume. Some datetime information like created_at and launched_at have been converted to string, that is why they are mssing the ISO8601 format.
In fact, volume_ref['launched_at'] and volume_ref['created_at'] are not string type in the database, but DateTime. If we replace te line created_at=null_safe_str(volume_ref['created_at']) wth created_at=timeutils.isotime(at=volume_ref['created_at']), the ISO8601 format will be kept. This is my proposal to resolve this issue. Plase review my patch for it.