HTTP 500 error from cli fm event-show command (or fm alarm-show) where UUID specified is not valid

Bug #1806927 reported by Wendy Mitchell
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Low
Lin Shuicheng

Bug Description

Brief Description
-----------------
STX: 500 server error in cli fm event-show command (or fm alarm-show) where UUID specified is not valid

Severity
--------
Minor

Steps to Reproduce
------------------
Run the fm cli command to attempt to show a fault managed event or alarm

$fm event-show <invalidstring>
$fm alarm-show <invalidstring>

Expected Behavior
------------------
Expect better validation/feedback when UUID is not complete or invalid when running
fm event-show
fm alarm-show

Actual Behavior
----------------
(keystone_admin)]# fm event-show <partial or invalid UUID, alpha or numeric string ID eg. 200.001>
HTTP Server Error (HTTP 500) (Request-ID: req-af6374fe-27e3-4c42-9e42-247586cd78a0)

Reproducibility
---------------
Yes

System Configuration
--------------------
any

Branch/Pull Time/Commit
-----------------------
Master as of: 2018-12-03_20-18-00

Timestamp/Logs
--------------

Revision history for this message
Ghada Khalil (gkhalil) wrote :

Minor issue with error response; would be nice to fix, but doesn't gate release. It maybe a good exercise for someone ramping up in the stx flock components.

Changed in starlingx:
importance: Undecided → Low
status: New → Triaged
tags: added: stx.fault
Changed in starlingx:
assignee: nobody → Bruce Jones (brucej)
Bruce Jones (brucej)
Changed in starlingx:
assignee: Bruce Jones (brucej) → Cindy Xie (xxie1)
Cindy Xie (xxie1)
Changed in starlingx:
assignee: Cindy Xie (xxie1) → Lin Shuicheng (shuicheng)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to stx-fault (master)

Fix proposed to branch: master
Review: https://review.openstack.org/642664

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

Reviewed: https://review.openstack.org/642664
Committed: https://git.openstack.org/cgit/openstack/stx-fault/commit/?id=1faff551f2865240a237a46fa8e2b4445a37a3cc
Submitter: Zuul
Branch: master

commit 1faff551f2865240a237a46fa8e2b4445a37a3cc
Author: Shuicheng Lin <email address hidden>
Date: Wed Mar 13 00:57:54 2019 +0800

    catch the correct exception for alarm not found case

    Issue:
    for the alarm_show/alarm_delete/event_show api, if the input UUID
    string is not valid, http server side will return error code 500
    (Internal Server Error), due to the error code is not set correctly.
    Solution:
    Correct the error code in server, and add client code to handle
    "HTTP 404 - Not Found" error code correctly.

    Test:
    Run "fm alarm-show/alarm-delete/event-show" with valid/invalid
    UUID, and the response is correct. For invalid UUID, response
    string will like below. "xxx" for the invalid UUID string.
    "Alarm not found: xxx"
    "Event log not found: xxx"

    Closes-Bug: 1806927

    Change-Id: I8d17c5bc55733f269d875ae835ab6295fed4d899
    Signed-off-by: Shuicheng Lin <email address hidden>

Changed in starlingx:
status: In Progress → Fix Released
Revision history for this message
Ghada Khalil (gkhalil) wrote :

Adding stx.2019.05 tag as this fix was merged for that release

tags: added: stx.2019.05
Ken Young (kenyis)
tags: added: stx.2.0
removed: stx.2019.05
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.