message_id field wrong for user-defined samples

Bug #1202696 reported by Frédéric FAURE
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ceilometer
Fix Released
High
Julien Danjou

Bug Description

When POSTing user-defined data in Ceilometer : if we set the message_id field in the sample, the returned sample from POST contains the inserted value:

"message_id": "222222222222222"

but when requesting after on the sample, an internal message_id was generated instead:

"message_id": "53b364be-ef98-11e2-9073-080027880ca6"

Either the generated one is returned from POST or the user-defined one is taken into account and stored.
Or last option: an error is raised because the user cannot set this "internal" field.

information type: Public → Public Security
information type: Public Security → Public
Revision history for this message
Frédéric FAURE (frederic-faure) wrote :
Julien Danjou (jdanjou)
Changed in ceilometer:
status: New → Confirmed
importance: Undecided → High
Changed in ceilometer:
assignee: nobody → Frédéric FAURE (frederic-faure)
Revision history for this message
Frédéric FAURE (frederic-faure) wrote :

Selected option: "the generated one is returned from POST".

If user set a message_id in the POSTed sample, it is just ignored (no error raised) and overridden by the generated value when sent into the pipeline and the generated value is returned in the samples' list too.

Revision history for this message
Feilong Wang (flwang) wrote :

Actually, I'm curious what's the user scenario to post the sample by themselves but don't want to provide a customized message id. Such as the sample collected by pollster stuff?

Julien Danjou (jdanjou)
Changed in ceilometer:
assignee: Frédéric FAURE (frederic-faure) → Julien Danjou (jdanjou)
milestone: none → havana-3
Revision history for this message
Frédéric FAURE (frederic-faure) wrote :

@Fei Long Wang (flwang): I'am using the V2 API and try to insert my own samples (with the POST method on /meters/my_meter) like "RAM used" I monitored on a compute instance with an agent. I should not have to set a message_id myself in this case (message_id is internally defined in only one place or with a given pattern to avoid conflicts).

Revision history for this message
Feilong Wang (flwang) wrote :

Got it, thanks for the clarification. BTW, may I know what kind of agent you're using :) ?

Revision history for this message
Frédéric FAURE (frederic-faure) wrote :

Actually it's just a "free" command in a shell: the result is extracted and POSTed to Ceilometer. It's just a test/example. It's not a real agent like with monitoring tools (Centreon, Zabbix, ...). My idea is to add some missing information in Ceilometer and then to use the same way than with other data gathered internally with pollster or notification for showing them into graphs.

Revision history for this message
Feilong Wang (flwang) wrote :

Frédéric FAURE, thanks for this explanation.

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/39678

Changed in ceilometer:
status: Confirmed → In Progress
Changed in ceilometer:
assignee: Julien Danjou (jdanjou) → Mehdi Abaakouk (sileht)
Julien Danjou (jdanjou)
Changed in ceilometer:
assignee: Mehdi Abaakouk (sileht) → Julien Danjou (jdanjou)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ceilometer (master)

Reviewed: https://review.openstack.org/39678
Committed: http://github.com/openstack/ceilometer/commit/3e1ef16fcbdcbc0a29476867213a997063825d52
Submitter: Jenkins
Branch: master

commit 3e1ef16fcbdcbc0a29476867213a997063825d52
Author: Julien Danjou <email address hidden>
Date: Thu Aug 1 14:15:59 2013 +0200

    Return message_id in POSTed samples

    Change-Id: I93e33158ad9933bcdfc263f9f59146524d8b6824
    Fixes: bug #1202696

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: havana-3 → 2013.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.