Not clear error presentation of creating alarm combination with invalid project id

Bug #1320433 reported by Liusheng
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ceilometer
Fix Released
Low
Liusheng

Bug Description

1. there are two alarms in my environment 06f4bf73-25ed-4145-b5a4-f94fc6c0bd9f and 6bf5807c-1288-4f41-aabc-6cdf0bc8e8db

2. create an alarm combination with invalid project id like this:
ceilometer alarm-combination-create --project-id non-project --alarm_ids 06f4bf73-25ed-4145-b5a4-f94fc6c0bd9f --alarm_ids 6bf5807c-1288-4f41-aabc-6cdf0bc8e8db --name test_com

it raise HTTPNotFound (HTTP 404) ERROR Alarm 06f4bf73-25ed-4145-b5a4-f94fc6c0bd9f Not Found

Actually, the alarm 06f4bf73-25ed-4145-b5a4-f94fc6c0bd9f is not found in project "non-project ".

Liusheng (liusheng)
Changed in ceilometer:
assignee: nobody → Liusheng (liusheng)
Revision history for this message
Eoghan Glynn (eglynn) wrote :

Does it make sense to expose the fact the alarm ID exists but is not visible to the project?

Are you proposing that a 401 is raised instead of a 404 in that case?

Changed in ceilometer:
status: New → Triaged
importance: Undecided → Low
description: updated
description: updated
Revision history for this message
Liusheng (liusheng) wrote :

I propose to give explicit return message like "alarm "06f4bf73-25ed-4145-b5a4-f94fc6c0bd9f" is not found in project "<project_id>", just keep 404, the fact of the alarm ID exists is better don't expose to user.

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

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

Reviewed: https://review.openstack.org/103069
Committed: https://git.openstack.org/cgit/openstack/ceilometer/commit/?id=7498db6f8f082a35c51197994afe0ef919583467
Submitter: Jenkins
Branch: master

commit 7498db6f8f082a35c51197994afe0ef919583467
Author: liu-sheng <email address hidden>
Date: Fri Jun 27 17:15:43 2014 +0800

    Make the error message of alarm-not-found clear

    When creating a alarm combination with invalid project, ceilometer will
    raise alarm-Not-Found error, even though the specified alarm ids are
    existent. The error message is easily misleading.
    This change gives a explicit presentation of this case.

    Change-Id: Id189209ed4ccf27543f8dc628ca5f82eeeeeaa44
    Closes-bug: #1320433

Changed in ceilometer:
status: In Progress → Fix Committed
Eoghan Glynn (eglynn)
Changed in ceilometer:
milestone: none → juno-3
Thierry Carrez (ttx)
Changed in ceilometer:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in ceilometer:
milestone: juno-3 → 2014.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.