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] Read start_time and image from the store on restart. Clo

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Read start_time and image from the store on restart. Closes bugs #441 and
From: Xen patchbot -3.0-testing <patchbot-3.0-testing@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 09 Dec 2005 10:06:21 +0000
Delivery-date: Fri, 09 Dec 2005 10:09:54 +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 bdaa231489ab19b37d3689d2957fa2c59211374e
# Parent  badf7f4ae40fccb07b8e881b284979fb75cd5a0d
Read start_time and image from the store on restart.  Closes bugs #441 and
#442

Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx>

xen-unstable cset: cdf76916951a49d77cb8b0d982a570eedbbb1538
committer: Robert Read <robert@xxxxxxxxxxxxx>

diff -r badf7f4ae40f -r bdaa231489ab tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py   Wed Dec  7 09:59:33 2005
+++ b/tools/python/xen/xend/XendDomainInfo.py   Thu Dec  8 04:10:22 2005
@@ -132,8 +132,8 @@
 
 
 ##
-# All entries written to the store.  This is VM_CONFIGURATION_PARAMS, plus
-# those entries written to the store that cannot be reconfigured on-the-fly.
+# All entries written to the store.  This is VM_CONFIG_PARAMS, plus those
+# entries written to the store that cannot be reconfigured on-the-fly.
 #
 VM_STORE_ENTRIES = [
     ('uuid',       str),
@@ -142,6 +142,7 @@
     ('vcpu_avail', int),
     ('memory',     int),
     ('maxmem',     int),
+    ('start_time', int),
     ]
 
 VM_STORE_ENTRIES += VM_CONFIG_PARAMS
@@ -446,7 +447,7 @@
     ## private:
 
     def readVMDetails(self, params):
-        """Read from the store all of those entries that we consider 
+        """Read the specified parameters from the store.
         """
         try:
             return self.gatherVm(*params)
@@ -473,6 +474,13 @@
 
         map(f, VM_CONFIG_PARAMS, self.readVMDetails(VM_CONFIG_PARAMS))
 
+        im = self.readVm('image')
+        current_im = self.info['image']
+        if (im is not None and
+            (current_im is None or sxp.to_string(current_im) != im)):
+            self.info['image'] = sxp.from_string(im)
+            changed = True
+
         if changed:
             # Update the domain section of the store, as this contains some
             # parameters derived from the VM configuration.
@@ -496,6 +504,7 @@
             entries.remove(('maxmem', int))
         else:
             entries = VM_STORE_ENTRIES
+        entries.append(('image', str))
 
         map(lambda x, y: useIfNeeded(x[0], y), entries,
             self.readVMDetails(entries))
@@ -648,9 +657,6 @@
 
         if self.infoIsSet('image'):
             to_store['image'] = sxp.to_string(self.info['image'])
-
-        if self.infoIsSet('start_time'):
-            to_store['start_time'] = str(self.info['start_time'])
 
         log.debug("Storing VM details: %s", to_store)
 

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

<Prev in Thread] Current Thread [Next in Thread>