OS API v1.1 bad error on server create with invalid flavor

Bug #804084 reported by Mark Washenberger
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Unassigned

Bug Description

When I create a server at /v1.1/servers with an invalid flavorRef in the POST body, I get the following response:

---
status : 400
content-length : 147
content-type : text/plain; charset=UTF-8
400 Bad Request

The server could not comply with the request since it is either malformed or otherwise incorrect.

 could not parse id from href
---

The content type should not be text/plain--it should respect the accept header. Additionally, the message should be formatted correctly (as in the following json example)

{
    "badRequest": {
         "code": 400,
         "message": ...,
         "details": ...
    }
}

Thierry Carrez (ttx)
Changed in nova:
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Brian Waldon (bcwaldon) wrote :

This issue is fixed:

curl -i -H "X-Auth-Token: ${NOVA_TOKEN}" -H "content-type: application/json" -X POST -d '{"server":{"name":"adsf","imageRef":"3","flavorRef":"a"}}' http://localhost:8774/v1.1/servers

HTTP/1.1 400 Bad Request
Content-Length: 71
Content-Type: application/json; charset=UTF-8
Date: Tue, 26 Jul 2011 03:30:08 GMT

{"badRequest": {"message": "Invalid flavorRef provided.", "code": 400}}

Changed in nova:
status: Confirmed → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → diablo-3
Thierry Carrez (ttx)
Changed in nova:
milestone: diablo-3 → 2011.3
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.