Inconsistent error messages for segment host show

Bug #1653610 reported by Hussain Chachuliya
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-masakariclient
Confirmed
Medium
Hussain Chachuliya

Bug Description

There is inconsistency in error messages that is displayed to the user via masakari-client and the one displayed in masakari-api service logs.
If user passes non-existing segment id to the "host show" command, then user should get proper error message saying "No failover segment with id <id>" instead of "Host not found: <hostname>" as it might confuse user if host name passed to the command is really existing.

Steps to reproduce:
-------------------
1. Execute segment host show command with a non-existing segment ID.

* From masakari-client:
$ openstack segment host show abc abb
Host not found: abb

* From masakari-api service logs:
2017-01-03 12:19:22.780 INFO masakari.api.openstack.wsgi [req-8f3f63a4-3b85-4508-bcf1-57c722e4af5a dbf0c5f0b24d4514824c29ded436bbd5 b3fb75ec568f4e719f8e12b818227a5b] HTTP exception thrown: No failover segment with id abc.

Expected output:
----------------
$ openstack segment host show abc abb
No failover segment with id abc.

description: updated
Changed in python-masakariclient:
assignee: nobody → Hussain Chachuliya (hussainchachuliya)
Revision history for this message
Tushar Patil (tpatil) wrote :

If user passes non-existing segment id to the "host show" command, then user should get proper error message saying "no failover segment with id <id>" instead of "host not found: <hostname>" as it might confuse user if host name passed to the command is really existing.

Changed in python-masakariclient:
importance: Undecided → Medium
status: New → Confirmed
description: updated
description: updated
Revision history for this message
Rohanil Raje (rohanil) wrote :

This is what I got on masakariclient:

$ openstack segment host show abc abb
NotFoundException: Not Found, No failover segment with id abc.

I think it is returning correct error message now. So looks fixed.
I am using commit: d875c0206f3b3987f05c85b273abd447f6203a79

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.