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

[Xen-changelog] Clear "/control/shutdown" node on domain restore.



# HG changeset patch
# User cl349@xxxxxxxxxxxxxxxxxxxx
# Node ID 27a4a073fc753d8410424c261bc06699573fe1c8
# Parent  698a7dc797e458d553a0926ca16a5d2f7a2b859f
Clear "/control/shutdown" node on domain restore.
Signed-off-by: Christian Limpach <Christian.Limpach@xxxxxxxxxxxx>

diff -r 698a7dc797e4 -r 27a4a073fc75 tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py   Wed Aug 17 09:59:04 2005
+++ b/tools/python/xen/xend/XendDomainInfo.py   Wed Aug 17 10:18:13 2005
@@ -208,6 +208,7 @@
         log.debug('restoring with ssidref='+str(ssidref))
         id = xc.domain_create(ssidref = ssidref)
         vm.setdom(id)
+        vm.clear_shutdown()
         try:
             vm.restore = True
             vm.construct(config)
@@ -979,6 +980,11 @@
         if not reason in ['suspend']:
             self.shutdown_pending = {'start':time.time(), 'reason':reason}
 
+    def clear_shutdown(self):
+        db = self.db.addChild("/control")
+        db['shutdown'] = ""
+        db.saveDB(save=True)
+
     def send_sysrq(self, key=0):
         db = self.db.addChild("/control");
         db['sysrq'] = '%c' % key;

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