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".
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".