glance command should show the reason of a error.

Bug #1094917 reported by Ken'ichi Ohmichi on 2012-12-31
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-glanceclient
Medium
Ken'ichi Ohmichi

Bug Description

Current glance command shows like the following message, if some parameter
is not specified:
     $ glance image-create --file root-fs.img --name cirros-0.3.0-x86_64-uec
     Request returned failure status.
     HTTPBadRequest (HTTP 400)
     $

By only the above message, it is not easy that a user understand the reason
of an error. glance-api server returns the details of reason, but glance command
does not show it.

I feel it is good for a user, if glance command shows the details of error which is
gotten from glance-api server.

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

Changed in python-glanceclient:
assignee: nobody → Ken'ichi Ohmichi (oomichi)
status: New → In Progress

Reviewed: https://review.openstack.org/18779
Committed: http://github.com/openstack/python-glanceclient/commit/19d542ef5f570d98e08008898a0ee31a3186d5a9
Submitter: Jenkins
Branch: master

commit 19d542ef5f570d98e08008898a0ee31a3186d5a9
Author: Ken'ichi Ohmichi <email address hidden>
Date: Tue Jan 1 22:33:15 2013 +0900

    Add details to stdout error message.

    Current glance command does not show the details of error message.
    For example, the glance command shows HTTPBadRequest only if some
    necessary parameter is not specified.

     $ glance image-create --file root-fs.img --name cirros-0.3.0-x86_64-uec
     Request returned failure status.
     HTTPBadRequest (HTTP 400)
     $

    By only the above message, it is not easy that a user understand the reason
    of an error. glance-api server returns the details of reason, but glance
    command does not show it.

    This patch adds details, which is gotten from glance-api server, to error
    message. And a user will be able to understand the reason of a error like
    the following:

     $ glance image-create --file root-fs.img --name cirros-0.3.0-x86_64-uec
     Request returned failure status.
     400 Bad Request
     Invalid disk format 'None' for image.
         (HTTP 400)
     $

    Fixes bug 1094917

    Change-Id: I49192c3ebbc8a70b63dcfcede9fd13f1688388cf

Changed in python-glanceclient:
status: In Progress → Fix Committed
Brian Waldon (bcwaldon) on 2013-02-21
Changed in python-glanceclient:
importance: Undecided → Medium
Brian Waldon (bcwaldon) on 2013-02-21
Changed in python-glanceclient:
milestone: none → v0.8.0
Brian Waldon (bcwaldon) on 2013-02-21
Changed in python-glanceclient:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers