[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] xm: Fix error message for xm create command.



# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1188313865 -3600
# Node ID 8e3abd893835db6a87f38153b98cee9b2736dae2
# Parent  7f53312a32973cdb6664e6f1d55bf3c4f68f5883
xm: Fix error message for xm create command.

When I tested xm create command, I saw the following error message.
I expected an error message "Error: (12, 'Cannot allocate memory')"
because I intentionally caused a memory shortage on the test.
But the error message was different from my expectation.

# xm create /xen/HVMdomain.1
Using config file "/xen/HVMdomain.1".
Error: an integer is required

I looked at xend.log to examine the cause why the error message was
shown.  (Could you see the attached xend.log?)
xend had the error message "Error: (12, 'Cannot allocate memory')"
first.  But xend changed the error message to "Error: an integer is
required" halfway.  I'm not sure about the cause why an exception
occurred in logging processing.  But when I applied an attached patch,
I confirmed that the error message that I expected was shown.  The
patch does not call xc.domain_destroy_hook() if self.domid is None.

Signed-off-by: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>
---
 tools/python/xen/xend/XendDomainInfo.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)

diff -r 7f53312a3297 -r 8e3abd893835 tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py   Tue Aug 28 16:08:38 2007 +0100
+++ b/tools/python/xen/xend/XendDomainInfo.py   Tue Aug 28 16:11:05 2007 +0100
@@ -1773,7 +1773,8 @@ class XendDomainInfo:
 
         self._cleanupVm()
         if self.dompath is not None:
-            xc.domain_destroy_hook(self.domid)
+            if self.domid is not None:
+                xc.domain_destroy_hook(self.domid)
             self.destroyDomain()
 
         self._cleanup_phantom_devs(paths)

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.