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

[Xen-changelog] Cope with the ValueError exception that we get if you use Xend with the recent



# HG changeset patch
# User emellor@xxxxxxxxxxxxxxxxxxxxxx
# Node ID 136b2d20dc81db51924aee54c8ec4ce6232defa2
# Parent  b2ea26d2099ac6a1d774cbc432c988fe0bc5d2d6
Cope with the ValueError exception that we get if you use Xend with the recent
change to parsing memory configuration against a store with entries written
by an older Xend.

Added maxmem field to list of things to be read from the store on recreate.

diff -r b2ea26d2099a -r 136b2d20dc81 tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py   Wed Nov  9 13:53:12 2005
+++ b/tools/python/xen/xend/XendDomainInfo.py   Wed Nov  9 15:08:37 2005
@@ -393,11 +393,22 @@
                   ("on_crash",     str),
                   ("image",        str),
                   ("memory",       int),
+                  ("maxmem",       int),
                   ("vcpus",        int),
                   ("vcpu_avail",   int),
                   ("start_time", float))
 
-        from_store = self.gatherVm(*params)
+        try:
+            from_store = self.gatherVm(*params)
+        except ValueError, exn:
+            # One of the int/float entries in params has a corresponding store
+            # entry that is invalid.  We recover, because older versions of
+            # Xend may have put the entry there (memory/target, for example),
+            # but this is in general a bad situation to have reached.
+            log.exception(
+                "Store corrupted at %s!  Domain %d's configuration may be "
+                "affected.", self.vmpath, self.domid)
+            return
 
         map(lambda x, y: useIfNeeded(x[0], y), params, from_store)
 

_______________________________________________
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®.