[cli] In case of errors show not only exception message and but also response from nailgun

Bug #1259585 reported by Evgeniy L
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Released
Medium
Alexandr Notchenko

Bug Description

Step to reproduce:

1. create cluster
2. tried to add node

Actual result:
Got an exception
(nailgun)[root@fuel fuelclient]# fuel node set --env 2 --node 1 --role controller
HTTP Error 400: Bad Request

Expected result:
Exception with error message where I can see description of problem (just show response from nailgun in case of such errors)
Example:

(nailgun)[root@fuel fuelclient]# fuel node set --env 2 --node 1 --role controller
HTTP Error 400: Bad Request

(nailgun)[root@fuel fuelclient]# fuel node set --env 2 --node 1 --role controller --debug
GET http://127.0.0.1:8000/api/v1/clusters/2/
PUT http://127.0.0.1:8000/api/v1/nodes/ data=[{"pending_addition": true, "pending_roles": ["controller"], "cluster_id": "2", "id": 1, "pending_deletion": false}]
HTTP Error 400: Bad Request

(nailgun)[root@fuel fuelclient]# curl -X PUT --data '[{"pending_addition": true, "pending_roles": ["controller"], "cluster_id": "2", "id": 1, "pending_deletion": false}]' http://127.0.0.1:8000/api/v1/nodes/
[127.0.0.1] Invalid ID specified(nailgun)[root@fuel fuelclient]#

Evgeniy L (rustyrobot)
Changed in fuel:
milestone: none → 4.0
status: New → Confirmed
importance: Undecided → Medium
assignee: nobody → Alexandr Notchenko (anotchenko)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-web (master)

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

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

Reviewed: https://review.openstack.org/61758
Committed: https://git.openstack.org/cgit/stackforge/fuel-web/commit/?id=b267a319b26949ee26c3c018e9ef6ce021c43a84
Submitter: Jenkins
Branch: master

commit b267a319b26949ee26c3c018e9ef6ce021c43a84
Author: Alexandr Notchenko <email address hidden>
Date: Thu Dec 12 18:36:05 2013 +0400

    api call error forwarding to cli

    * prints api call error along with http error
    * checks for empty error response body

    Closes-bug: #1259585

    Change-Id: I332fa960d74681610e6cf6b759c9b6bd5f91ec91

Changed in fuel:
status: In Progress → Fix Committed
Dmitry Pyzhov (dpyzhov)
Changed in fuel:
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.