WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] Cope with the ValueError exception that we get if you us

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Cope with the ValueError exception that we get if you use Xend with the recent
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 09 Nov 2005 17:52:12 +0000
Delivery-date: Wed, 09 Nov 2005 17:53:08 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Cope with the ValueError exception that we get if you use Xend with the recent, Xen patchbot -unstable <=