sample POST fails on pipeline publish if user & project IDs not explicitly set

Bug #1202143 reported by Eoghan Glynn
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ceilometer
Fix Released
Critical
Eoghan Glynn

Bug Description

If the user and project IDs are not explicitly set, POSTing a sample to the v2 meters API fails with asynchronously when the sample is published[1]

These IDs should default to the current auth context.

[1]
2013-07-17 10:00:57.614 16864 ERROR ceilometer.pipeline [-] Pipeline meter_pipeline: Continue after error from publisher <ceilometer.publisher.rpc.R
PCPublisher object at 0x3d69890>
2013-07-17 10:00:57.614 16864 TRACE ceilometer.pipeline Traceback (most recent call last):
2013-07-17 10:00:57.614 16864 TRACE ceilometer.pipeline File "/opt/stack/ceilometer/ceilometer/pipeline.py", line 217, in _publish_counters
2013-07-17 10:00:57.614 16864 TRACE ceilometer.pipeline p.publish_counters(ctxt, transformed_counters, source)
2013-07-17 10:00:57.614 16864 TRACE ceilometer.pipeline File "/opt/stack/ceilometer/ceilometer/publisher/rpc.py", line 139, in publish_counters
2013-07-17 10:00:57.614 16864 TRACE ceilometer.pipeline rpc.cast(context, topic, msg)
2013-07-17 10:00:57.614 16864 TRACE ceilometer.pipeline File "/opt/stack/ceilometer/ceilometer/openstack/common/rpc/__init__.py", line 158, in cas
t
2013-07-17 10:00:57.614 16864 TRACE ceilometer.pipeline return _get_impl().cast(CONF, context, topic, msg)
2013-07-17 10:00:57.614 16864 TRACE ceilometer.pipeline File "/opt/stack/ceilometer/ceilometer/openstack/common/rpc/impl_kombu.py", line 833, in cast
2013-07-17 10:00:57.614 16864 TRACE ceilometer.pipeline rpc_amqp.get_connection_pool(conf, Connection))
2013-07-17 10:00:57.614 16864 TRACE ceilometer.pipeline File "/opt/stack/ceilometer/ceilometer/openstack/common/rpc/amqp.py", line 546, in cast
2013-07-17 10:00:57.614 16864 TRACE ceilometer.pipeline conn.topic_send(topic, rpc_common.serialize_msg(msg))
2013-07-17 10:00:57.614 16864 TRACE ceilometer.pipeline File "/opt/stack/ceilometer/ceilometer/openstack/common/rpc/common.py", line 484, in serialize_msg
2013-07-17 10:00:57.614 16864 TRACE ceilometer.pipeline _MESSAGE_KEY: jsonutils.dumps(raw_msg)}
2013-07-17 10:00:57.614 16864 TRACE ceilometer.pipeline File "/opt/stack/ceilometer/ceilometer/openstack/common/jsonutils.py", line 151, in dumps
2013-07-17 10:00:57.614 16864 TRACE ceilometer.pipeline return json.dumps(value, default=default, **kwargs)
2013-07-17 10:00:57.614 16864 TRACE ceilometer.pipeline File "/usr/lib/python2.7/json/__init__.py", line 238, in dumps
2013-07-17 10:00:57.614 16864 TRACE ceilometer.pipeline **kw).encode(obj)
2013-07-17 10:00:57.614 16864 TRACE ceilometer.pipeline File "/usr/lib/python2.7/json/encoder.py", line 201, in encode
2013-07-17 10:00:57.614 16864 TRACE ceilometer.pipeline chunks = self.iterencode(o, _one_shot=True)
2013-07-17 10:00:57.614 16864 TRACE ceilometer.pipeline File "/usr/lib/python2.7/json/encoder.py", line 264, in iterencode
2013-07-17 10:00:57.614 16864 TRACE ceilometer.pipeline return _iterencode(o, 0)
2013-07-17 10:00:57.614 16864 TRACE ceilometer.pipeline ValueError: Circular reference detected
2013-07-17 10:00:57.614 16864 TRACE ceilometer.pipeline
2013-07-17 10:00:57.618 16864 AUDIT ceilometer.pipeline [-] Pipeline meter_pipeline: Published counters
2013-07-17 10:00:57.618 16864 AUDIT ceilometer.pipeline [-] Flush pipeline meter_pipeline
2013-07-17 10:00:57.618 16864 AUDIT ceilometer.pipeline [-] Flush pipeline cpu_pipeline
2013-07-17 10:00:57.619 16864 AUDIT ceilometer.pipeline [-] Pipeline cpu_pipeline: Publishing counters

Eoghan Glynn (eglynn)
Changed in ceilometer:
status: New → Confirmed
importance: Undecided → Critical
assignee: nobody → Eoghan Glynn (eglynn)
Eoghan Glynn (eglynn)
Changed in ceilometer:
status: Confirmed → In Progress
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/37449

Eoghan Glynn (eglynn)
Changed in ceilometer:
milestone: none → havana-2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ceilometer (master)

Reviewed: https://review.openstack.org/37449
Committed: http://github.com/openstack/ceilometer/commit/1d0b6397d468d8527ad3b388ee2f2b1714f3c38d
Submitter: Jenkins
Branch: master

commit 1d0b6397d468d8527ad3b388ee2f2b1714f3c38d
Author: Eoghan Glynn <email address hidden>
Date: Wed Jul 17 11:27:47 2013 +0000

    Default to ctx user/project ID in sample POST API

    Fixes bug #1202143

    Avoid RPC failure when project and user IDs not explicitly
    specified in POST'd sample.

    Instead default to identity in current context.

    Change-Id: Id1368c7ccf730bc62bc2b32247266e87482844cb

Changed in ceilometer:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ceilometer (milestone-proposed)

Fix proposed to branch: milestone-proposed
Review: https://review.openstack.org/37574

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

Reviewed: https://review.openstack.org/37574
Committed: http://github.com/openstack/ceilometer/commit/64c499354fe751f7a71f20e6e5277701658d4e3e
Submitter: Jenkins
Branch: milestone-proposed

commit 64c499354fe751f7a71f20e6e5277701658d4e3e
Author: Eoghan Glynn <email address hidden>
Date: Wed Jul 17 11:27:47 2013 +0000

    Default to ctx user/project ID in sample POST API

    Fixes bug #1202143

    Avoid RPC failure when project and user IDs not explicitly
    specified in POST'd sample.

    Instead default to identity in current context.

    Change-Id: Id1368c7ccf730bc62bc2b32247266e87482844cb
    (cherry picked from commit 1d0b6397d468d8527ad3b388ee2f2b1714f3c38d)

Changed in ceilometer:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in ceilometer:
milestone: havana-2 → 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.