Invalid keyname translated to null on create server

Bug #891434 reported by Nachi Ueno
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Invalid
Low
Unassigned

Bug Description

Invalid keyname translated to null on create server
400 bad request should raise for the case a user mistype keyname.

Test:
curl -i -H "x-auth-token: $AUTHTOKEN" -H "content-type: application/json" -d '{"server":{"name":"fuga","imageRef":2,"flavorRef":3,"KeyPair":"fuga"}}' $APIURL/v1.1/2/servers
HTTP/1.1 202 Accepted
Content-Type: application/json
Content-Length: 718
Date: Wed, 16 Nov 2011 23:49:50 GMT

{"server": {"status": "BUILD", "updated": "2011-11-16T23:49:50Z", "hostId": "", "user_id": "demo", "name": "fuga", "links": [{"href": "http://127.00.1:8774/v1.1/2/servers/6", "rel": "self"}, {"href": "http://127.00.1:8774/2/servers/6", "rel": "bookmark"}], "addresses": {}, "tenant_id": "2", "image": {"id": "2", "links": [{"href": "http://127.00.1:8774/2/images/2", "rel": "bookmark"}]}, "created": "2011-11-16T23:49:50Z", "uuid": "2be30959-3f4c-4477-bc0c-6050855b1233", "accessIPv4": "", "accessIPv6": "", "key_name": null, "adminPass": "FxPyk3MLhSqxbW4T", "progress": 0, "flavor": {"id": "3", "links": [{"href": "http://127.00.1:8774/2/flavors/3", "rel": "bookmark"}]}, "config_drive": "", "id": 6, "metadata": {}}}

Thierry Carrez (ttx)
Changed in nova:
importance: Undecided → Low
status: New → Confirmed
Brian Waldon (bcwaldon)
Changed in nova:
status: Confirmed → In Progress
assignee: nobody → Brian Waldon (bcwaldon)
milestone: none → essex-4
Revision history for this message
Brian Waldon (bcwaldon) wrote :

I'd think the right behavior here is to fail with a 4xx exception on boot. Do you agree?

no longer affects: openstack-qa
Revision history for this message
Brian Waldon (bcwaldon) wrote :

Assuming that's what you would expect, here's the response I get when I provide an unknown keypair:

vagrant@nova:~/devstack$ nova boot --image=40056748-4bbc-4ed9-8dfd-cba355a0b493 --flavor=1 --key_name=a wha

Invalid key_name provided. (HTTP 400)

Brian Waldon (bcwaldon)
Changed in nova:
assignee: Brian Waldon (bcwaldon) → nobody
status: In Progress → Incomplete
milestone: essex-4 → none
Revision history for this message
Thierry Carrez (ttx) wrote :

Looks fixed to me. Please reopen (set back to New) if you disagree.

Changed in nova:
status: Incomplete → Invalid
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.