From ca77edbcebf458b004e04cbe8b41df24cdaac646 Mon Sep 17 00:00:00 2001 From: Guido Trotter <ultrotter@google.com> Date: Wed, 21 Jan 2009 18:23:59 +0000 Subject: [PATCH] ShutdownInstance: log instance name, not object When an instance fails to shut down we currently log its whole object, rather than just the instance name. Reviewed-by: iustinp --- lib/backend.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/backend.py b/lib/backend.py index 3a86cbbe5..7bcf6e188 100644 --- a/lib/backend.py +++ b/lib/backend.py @@ -909,7 +909,8 @@ def ShutdownInstance(instance): time.sleep(10) else: # the shutdown did not succeed - logging.error("shutdown of '%s' unsuccessful, using destroy", instance) + logging.error("Shutdown of '%s' unsuccessful, using destroy", + instance.name) try: hyper.StopInstance(instance, force=True) @@ -919,7 +920,7 @@ def ShutdownInstance(instance): time.sleep(1) if instance.name in GetInstanceList([hv_name]): - logging.error("could not shutdown instance '%s' even by destroy", + logging.error("Could not shutdown instance '%s' even by destroy", instance.name) return False -- GitLab