KeypairNotFound error message incomplete

Bug #854630 reported by Eric Dodemont
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Committed
Low
Alvaro Lopez

Bug Description

If you try to run an instance with an incorrect keypair (not existing or not belonging to the project), you receive the "KeypairNotFound" error message (that's ok), but the keypair_name and user_id fields are not shown correctly (that's nok):

root@node1:~# euca-run-instances -k key-dodeeric -t m1.tiny ami-00000003
KeypairNotFound: Keypair %(keypair_name)s not found for user %(user_id)s

Tags: keypair
Revision history for this message
Gavin B (gavin-brebner-orange) wrote :

Confirmed on my natty (client) + Diablo-2 server setup.

Updating status and importance.

Changed in nova:
status: New → Confirmed
importance: Undecided → Low
Revision history for this message
Sirisha Devineni (sirisha-devineni) wrote :

This issue is because of improper variable name in error message while handling KeypairNot found Exception in “class KeypairNotFound(NotFound)

Solution: In $nova/nova/exception.py (456) need to change the error message of class KeypairNotFound(NotFound) as follows:
                                                                message = _("Keypair %(name)s not found for user %(user_id)s")

as the variable name using while raising exception is "name" instead of "keypair_name".

Alvaro Lopez (aloga)
Changed in nova:
assignee: nobody → Alvaro (aloga)
status: Confirmed → In Progress
Revision history for this message
Alvaro Lopez (aloga) wrote :

It was fixed in commit 028f9ba81a857d0285bf68d789eae0a65772e39f

Changed in nova:
status: In Progress → Fix Committed
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.