Skip to content

Commit

Permalink
Clarify error messages for admin passwords.
Browse files Browse the repository at this point in the history
Logs the instance uuid and a more clear error message when errors
occur while setting admin passwords. Fixes LP bug #918502.

Change-Id: I7d698ee87ac147cb5137cb77d0c0297a47507798
  • Loading branch information
Dan Prince committed Jan 19, 2012
1 parent a444e8f commit 811a6f3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion nova/compute/manager.py
Expand Up @@ -913,7 +913,9 @@ def set_admin_password(self, context, instance_uuid, new_pass=None):

if instance_state != expected_state:
self._instance_update(context, instance_id, task_state=None)
raise exception.Error(_('Instance is not running'))
raise exception.Error(_('Failed to set admin password. '
'Instance %s is not running'),
instance_ref["uuid"])
else:
try:
self.driver.set_admin_password(instance_ref, new_pass)
Expand Down

0 comments on commit 811a6f3

Please sign in to comment.