Server create error messages/fault codes
Bug #803615 reported by
Brian Lamar
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Undecided
|
Brian Lamar |
Bug Description
When using a bad imageRef in POST /v1.1/servers the desired response is:
{
"computeFault": {
"message": "Invalid imageRef provided.",
"code": 400,
},
}
but I'm getting:
{
"cloudServe
"message": "Invalid image href -1.",
"code": 500,
},
}
Also,
When using a bad flavorRef in POST /v1.1/servers the desired response is:
{
"computeFault": {
"message": "Invalid flavorRef provided.",
"code": 400,
},
}
These error messages should be rectified.
Related branches
lp:~rackspace-titan/nova/lp803615
- Brian Lamar (community): Approve
- Brian Waldon (community): Approve
- Devin Carlen (community): Approve
- Alex Meade (community): Approve
-
Diff: 69 lines (+40/-2)2 files modifiednova/api/openstack/create_instance_helper.py (+8/-2)
nova/tests/api/openstack/test_servers.py (+32/-0)
Changed in nova: | |
status: | Incomplete → In Progress |
Changed in nova: | |
status: | In Progress → Fix Committed |
Changed in nova: | |
milestone: | none → diablo-3 |
Changed in nova: | |
milestone: | diablo-3 → 2011.3 |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Hey, I couldn't get this behavior repeated. Only for a bad flavor.
In api/openstack/ create_ instance_ helper:
143 except exception. ImageNotFound as error: Fault(exc. HTTPBadRequest( explanation= msg)) FlavorNotFound as error: Fault(exc. HTTPBadRequest( explanation= msg))
144 msg = _("Can not find requested image")
145 raise faults.
+146 except exception.
+147 msg = _("Invalid flavorRef provided.")
+148 raise faults.
Seems to fix the problem