glance command should show the reason of a error.

Bug #1094917 reported by Ken'ichi Ohmichi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance Client
Fix Released
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.

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

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
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-glanceclient (master)

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)
Changed in python-glanceclient:
importance: Undecided → Medium
Brian Waldon (bcwaldon)
Changed in python-glanceclient:
milestone: none → v0.8.0
Brian Waldon (bcwaldon)
Changed in python-glanceclient:
status: Fix Committed → 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.