error message of "nova" after trying to create a keypair with the name of an existing keypair should be something useful
Bug #917841 reported by
Christian Berendt
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Confirmed
|
Low
|
Unassigned |
Bug Description
i think the error message should be "there is already an existing key with the name 'foobar'" or somethink like that.
example:
stack@stack1:~$ nova --username admin --password testing keypair-list
+------
| Name | Fingerprint |
+------
| foobar | f8:3e:13:
+------
stack@stack1:~$ nova keypair-add foobar
The server has either erred or is incapable of performing the requested operation. (HTTP 500)
Changed in nova: | |
importance: | Undecided → Low |
status: | New → Confirmed |
Changed in nova: | |
assignee: | nobody → Brian Waldon (bcwaldon) |
Changed in nova: | |
status: | Confirmed → In Progress |
Changed in nova: | |
status: | In Progress → Confirmed |
assignee: | Brian Waldon (bcwaldon) → nobody |
To post a comment you must log in.
exception on nova-api is correct:
(nova.api. openstack) : TRACE: raise exception. KeyPairExists( key_name= name) openstack) : TRACE: KeyPairExists: Key pair foobar already exists.
(nova.api.
nova receives a unspecific error:
RESP:{'date': 'Thu, 26 Jan 2012 22:25:46 GMT', 'status': '500', 'content-length': '128', 'content-type': 'application/json; charset=UTF-8'} {"computeFault": {"message": "The server has either erred or is incapable of performing the requested operation.", "code": 500}}
"computeFault" is defined in nova/api/ openstack/ wsgi.py in class Fault, a wrapper for webob.exc. HTTPException.
The wrapper receives as exception a WebOb.webob. exc.HTTPServerE rror object and not the KeyPairExists exception.
This is because the class FaultWrapper in nova/api/ openstack/ __init_ _.py simply catchs all exceptions and afterward it returns a webob.exc. HTTPInternalSer verError( ) exception for every case.
I would prefer setting the explanation for the HTTPException more specific --> exc.explanation = unicode(ex)