From 523687d79a067e219636de0f5a970bfd11dc67cc Mon Sep 17 00:00:00 2001 From: Iustin Pop <iustin@google.com> Date: Tue, 4 Dec 2007 11:04:53 +0000 Subject: [PATCH] Log instance startup errors correctly MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently, the Hypervisor error raised on βxm createβ failure doesn't contain the actual output from the command, thus what we log to the node daemon log is not helpful enough. This patch fixes that. Reviewed-by: schreiberal --- lib/hypervisor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/hypervisor.py b/lib/hypervisor.py index 04737add1..3eb5368c5 100644 --- a/lib/hypervisor.py +++ b/lib/hypervisor.py @@ -265,8 +265,8 @@ class XenHypervisor(BaseHypervisor): result = utils.RunCmd(["xm", "create", instance.name]) if result.failed: - raise HypervisorError("Failed to start instance %s: %s" % - (instance.name, result.fail_reason)) + raise HypervisorError("Failed to start instance %s: %s (%s)" % + (instance.name, result.fail_reason, result.output)) def StopInstance(self, instance, force=False): """Stop an instance.""" -- GitLab