HTTP 500 is returned when using an invalid port id to attach interface
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Undecided
|
Qin Zhao |
Bug Description
When I post an 'attach interface' request to Nova with an invalid port id, Nova returns an HTTP 500 error and a confusing error message.
REQ: curl -i 'http://
INFO (connectionpool
DEBUG (connectionpool
RESP: [500] {'date': 'Fri, 17 Oct 2014 05:09:38 GMT', 'content-length': '128', 'content-type': 'application/json; charset=UTF-8'}
RESP BODY: {"computeFault": {"message": "The server has either erred or is incapable of performing the requested operation.", "code": 500}}
In fact, Nova works perfect well. The error is caused by my incorrect input. Nova should be able to address this incorrect input, and return an HTTP 400 error in order to to inform the user to correct the request.
Changed in nova: | |
assignee: | nobody → Qin Zhao (zhaoqin) |
status: | New → In Progress |
Changed in nova: | |
milestone: | none → kilo-2 |
status: | Fix Committed → Fix Released |
Changed in nova: | |
milestone: | kilo-2 → 2015.1.0 |
Reviewed: https:/ /review. openstack. org/122091 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=e57412c05e2 ee52d40d294a163 6c9fc2b990b636
Committed: https:/
Submitter: Jenkins
Branch: master
commit e57412c05e2ee52 d40d294a1636c9f c2b990b636
Author: Qin Zhao <email address hidden>
Date: Wed Sep 17 16:36:35 2014 +0800
Raise NotFound if attach interface with invalid net id or port id
When posting an 'attach interface' request to Nova with an invalid
network id or port id, Nova returns HTTP 500 which indicates the
attach operation fails. In fact, Nova get an empty network list or
PortNotFound exception from Neutron due to incorrect input. Nova
should address the error and raise NotFound in order to inform the
user to correct the request.
Change-Id: I3c5e07d5d6920a 750d25398da8388 a39b76a2944
Closes-Bug: 1370359
Closes-Bug: 1382343