faultstring can leak between requests

Bug #1260398 reported by Thomas Herve
22
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Ceilometer
Fix Released
Undecided
Mehdi Abaakouk
Havana
Fix Released
Undecided
ZhiQiang Fan

Bug Description

I've observed that one can get faultstring from previous requests in Ceilometer. To reproduce:

$ ceilometer --debug alarm-combination-create --name alarm1 --alarm_ids non-existing
...
{"error_message": {"debuginfo": null, "faultcode": "Client", "faultstring": "Alarm non-existing doesn't exist"}}

$ ceilometer --debug sample-create -r resource1 -m meter1 --meter-type wrong-meter --meter-unit seconds --sample-volume 100
....
{"error_message": {"debuginfo": null, "faultcode": "Client", "faultstring": "Alarm non-existing doesn't exist"}}

Oops.

It seems that TranslationHook.local_error.translatable_error is not cleaned between requests, thus being reused, and you can get it if you happen to be in the same thread.

Changed in ceilometer:
assignee: nobody → Piyush Dubey (priyansh147-pd)
Revision history for this message
Mehdi Abaakouk (sileht) wrote :

Sorry Piyush Dubey, I have already fixed this bug, but I have missed to take it in launchpad

Changed in ceilometer:
assignee: Piyush Dubey (priyansh147-pd) → Mehdi Abaakouk (sileht)
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/62001

Changed in ceilometer:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ceilometer (master)

Reviewed: https://review.openstack.org/62001
Committed: https://git.openstack.org/cgit/openstack/ceilometer/commit/?id=02d017022bab577b581b58f42b468bf0b2c644a9
Submitter: Jenkins
Branch: master

commit 02d017022bab577b581b58f42b468bf0b2c644a9
Author: Mehdi Abaakouk <email address hidden>
Date: Fri Dec 13 08:13:45 2013 +0100

    Ensure the correct error message is displayed

    When a untranslated error message pass through the translation pecan
    hook, the previous translated error is send to the client.

    This patch fix that by reseting the "translatable_error" of the
    translation pecan hook before each request.

    Change-Id: Icee79cf09fd696655048c7c0cf8a3d6706e31701
    Fixes: bug #1260398

Changed in ceilometer:
status: In Progress → Fix Committed
gordon chung (chungg)
Changed in ceilometer:
milestone: none → icehouse-2
Thierry Carrez (ttx)
Changed in ceilometer:
status: Fix Committed → Fix Released
Julien Danjou (jdanjou)
tags: added: havana-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ceilometer (stable/havana)

Fix proposed to branch: stable/havana
Review: https://review.openstack.org/78633

Alan Pevec (apevec)
tags: removed: havana-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ceilometer (stable/havana)

Reviewed: https://review.openstack.org/78633
Committed: https://git.openstack.org/cgit/openstack/ceilometer/commit/?id=b13ee97119606ff40fda0b952214531688acbbd4
Submitter: Jenkins
Branch: stable/havana

commit b13ee97119606ff40fda0b952214531688acbbd4
Author: Mehdi Abaakouk <email address hidden>
Date: Fri Dec 13 08:13:45 2013 +0100

    Ensure the correct error message is displayed

    When a untranslated error message pass through the translation pecan
    hook, the previous translated error is send to the client.

    This patch fix that by reseting the "translatable_error" of the
    translation pecan hook before each request.

    Conflicts:

        tests/api/v2/test_app.py

    Change-Id: Icee79cf09fd696655048c7c0cf8a3d6706e31701
    Fixes: bug #1260398
    (cherry picked from commit 02d017022bab577b581b58f42b468bf0b2c644a9)

Thierry Carrez (ttx)
Changed in ceilometer:
milestone: icehouse-2 → 2014.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.