Error messages are not displayed correctly for segment create and host create

Bug #1653108 reported by Dinesh Bhor
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
python-masakariclient
Fix Released
High
Dinesh Bhor

Bug Description

Error messages should be user friendly and self explanatory.

For the following commands proper error messages are returned from masakari-api service but the error message is not displayed correctly at masakariclient side:

1) If the host is already present with the same name:

dopenstack@dopenstack-VirtualBox:~$ openstack segment host create dopenstack-VirtualBox SSH nothing aa29a6f2-e75e-4662-b27f-7b0a9cea77e9

OUTPUT:
HttpException: Conflict

2) If the segment is already present with the same name:

dopenstack@dopenstack-VirtualBox:~$ openstack segment create segment1 auto service_type1

OUTPUT:
HttpException: Conflict

3) If the recovery_method of the segment is invalid:

dopenstack@dopenstack-VirtualBox:~$ openstack segment create segment1 autoe service_type1

OUTPUT:
HttpException: Bad Request

4) If the service_type value of segment is too large(greater than 255 characters)

dopenstack@dopenstack-VirtualBox:~$ openstack segment create segment1 auto service_type122222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222

OUTPUT:
HttpException: Bad Request

5) If the segment itself is not present while creating host:

dopenstack@dopenstack-VirtualBox:~$ openstack segment host create dopenstack-VirtualBox SSH nothing aa29a6f2-e75e-4662-b27f-7b0a9cea77e9d

OUTPUT:
NotFoundException: Not Found

Expected Output: In all the above cases, the error message returned from the masakari-api service should be displayed at the masakari client side.

Changed in python-masakariclient:
assignee: nobody → Dinesh Bhor (dinesh-bhor)
Tushar Patil (tpatil)
Changed in python-masakariclient:
status: New → Confirmed
importance: Undecided → High
Tushar Patil (tpatil)
description: updated
Revision history for this message
Dinesh Bhor (dinesh-bhor) wrote :

This issue was there in python-openstacksdk and fixed in the following patch: https://review.openstack.org/#/c/420722/

The fix is available in python-openstacksdk 0.9.13

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-masakariclient (master)

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

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

Reviewed: https://review.openstack.org/437036
Committed: https://git.openstack.org/cgit/openstack/python-masakariclient/commit/?id=93296cbd430ef98563d17a1c80172b4369110625
Submitter: Jenkins
Branch: master

commit 93296cbd430ef98563d17a1c80172b4369110625
Author: dineshbhor <email address hidden>
Date: Wed Feb 22 22:09:47 2017 +0530

    Bump openstacksdk to 0.9.13

    The patch[1] is submitted in python-openstacksdk which fixes
    the bug: 1653108. This patch bumps the python-openstacksdk to
    0.9.13 which includes that fix.

    [1] I6d728abbcc5e914b5bd025bc4e059cdcb13e2109
    Closes-Bug: #1653108
    Change-Id: I109e05cd413bf7bdf39a54992b36b0db660220c8

Changed in python-masakariclient:
status: In Progress → Fix Released
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.