Bug 1521176

Summary: [RFE] Gnocchi does not reflect the ceilometer event dates.
Product: Red Hat OpenStack Reporter: Dariusz Wojewódzki <dwojewod>
Component: openstack-ceilometerAssignee: Mehdi ABAAKOUK <mabaakou>
Status: CLOSED ERRATA QA Contact: Sasha Smolyak <ssmolyak>
Severity: high Docs Contact:
Priority: high    
Version: 10.0 (Newton)CC: apannu, jdanjou, jruzicka, lmiccini, mabaakou, mlehmann, pkilambi, srevivo
Target Milestone: Upstream M1Keywords: FutureFeature, Triaged
Target Release: 14.0 (Rocky)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-ceilometer-10.0.1-0.20180530162349.1c02e4b.el7ost Doc Type: Enhancement
Doc Text:
Instance resources have three new attributes: launched_at, deleted_at, created_at to track the exact time that Nova creates/launches/deletes instances.
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-01-11 11:48:37 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1639267    
Bug Blocks:    

Description Dariusz Wojewódzki 2017-12-05 22:51:02 UTC
Description of problem:

The issue with extracting reliable usage and event data from openstack with gnocchi.


The gnocchi resource "started_at" timestamps are not the correct timestamps of the nova instance start time, as they differ a few minutes from the nova data and the ceilometer event data for the instance start event. 
The started_at is set the first time that Ceilometer creates the resource in Gnocchi, no data from Nova is used.
Gnocchi resources never get an “ended_at” date.

Version-Release number of selected component (if applicable):
Gnocchi/Ceilometer in OSP10


How reproducible:

The gnocchi resource of type instance has the following timestamp:
(gnocchi resource list or gnocchi resource show)

Resource started at:
2017-12-01T10:11:34.724926+00:00
Revision started at:
2017-12-01T10:11:34.724948+00:00 


nova show delivers the following for the launched_at param of nova:
OS-SRV-USG:launched_at               | 2017-12-01T10:07:36.000000  

When looking up the ceilometer compute.instance.create.end event, this has the timestamp:
 ceilometer event-list -q 'event_type=compute.instance.create.end;instance_id=5023b71f-c8c2-4a1a-82f0-1fdafdb090b7'

 launched_at    | datetime |                    2017-12-01T10:07:36.759000      
The according ceilometer event was generated at: 2017-12-01T10:07:37.017000


Actual results:
Gnocchi started_at timestamps are not in sync with the timestamps of the ceilometer events.
There are nearly 4 minutes in between the launched_at timestamp of the instance and the "started_at" timestamp of gnocchi.

Gnocchi ended_at timestamps are missing.

There is also (small) difference in between the launched_at time value in nova and the ceilometer event.


Expected results:
Customer needs reliable data for metering and billing.
At the moment It looks like every component creates an own timestamp.

Comment 21 Sasha Smolyak 2018-12-11 15:09:20 UTC
Tested, automated. Verified

Comment 24 errata-xmlrpc 2019-01-11 11:48:37 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2019:0045