neutron fails with BadRequest

Bug #1633361 reported by Choe, Cheng-Dae
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack SDK
Fix Released
Undecided
Choe, Cheng-Dae

Bug Description

when neutron api failed. openstack sdk reports just "HttpException: BadRequest".

in debug mode says that openstack receive error message in body as key "NeutronError"

RESP BODY: {"NeutronError": {"message": "Invalid input for routes. Reason: Duplicate hostroute '{u'nexthop': u'10.51.68.25', u'destination': u'10.10.10.0/24'}'.", "type": "HTTPBadRequest", "detail": ""}}

and python-neutronclient handles this message in https://github.com/openstack/python-neutronclient/blob/master/neutronclient/v2_0/client.py#L46

Tags: network
Changed in python-openstacksdk:
assignee: nobody → Choe, Cheng-Dae (whitekid)
Changed in python-openstacksdk:
status: New → In Progress
Richard Theis (rtheis)
tags: added: network
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-openstacksdk (master)

Reviewed: https://review.openstack.org/386440
Committed: https://git.openstack.org/cgit/openstack/python-openstacksdk/commit/?id=23f4aa883244098f121c244e897c417410a8544f
Submitter: Jenkins
Branch: master

commit 23f4aa883244098f121c244e897c417410a8544f
Author: Choe, Cheng-Dae <email address hidden>
Date: Fri Oct 14 16:55:45 2016 +0900

    Display neutron api error message more precisely

    When neutron-api response fails. Session object reports error as

        HttpException: Bad Request

    and this cause lack of error information on openstack cli output.
    buy the way neutron failure response body contains more informations

        {"NeutronError": {
     "message": "here is error message", "type": "HTTPBadRequest",
     "detail": ""}}

    This changes raise exception with more precise error messages.

    Change-Id: Ibea40e37ee6b6135f8b00c8a46e023ff59befd5b
    Closes-Bug: 1633361

Changed in python-openstacksdk:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.