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

[Xen-changelog] [xen-unstable] remus: proper cleanup on checkpoint failure.



# HG changeset patch
# User Shriram Rajagopalan <rshriram@xxxxxxxxx>
# Date 1302277744 -3600
# Node ID 13ec53a59a42d8a74a95e9439096d68e81ac2f32
# Parent  e917931a698b84293e94971209db62e37d7fcff8
remus: proper cleanup on checkpoint failure.

While running remus, when an error occurs during checkpointing
(e.g., timeouts on primary, failing to checkpoint network buffer
or disk or even communication failure) the domU is sometimes
left in suspended state on primary. Instead of blindly closing
the checkpoint file handle, attempt to resume the domain before
the close.

Signed-off-by: Shriram Rajagopalan <rshriram@xxxxxxxxx>
Committed-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---


diff -r e917931a698b -r 13ec53a59a42 
tools/python/xen/lowlevel/checkpoint/checkpoint.c
--- a/tools/python/xen/lowlevel/checkpoint/checkpoint.c Fri Apr 08 16:40:58 
2011 +0100
+++ b/tools/python/xen/lowlevel/checkpoint/checkpoint.c Fri Apr 08 16:49:04 
2011 +0100
@@ -80,6 +80,9 @@
 {
   CheckpointObject* self = (CheckpointObject*)obj;
 
+  if (checkpoint_resume(&self->cps) < 0)
+    fprintf(stderr, "%s\n", checkpoint_error(&self->cps));
+
   checkpoint_close(&self->cps);
 
   Py_XDECREF(self->suspend_cb);
diff -r e917931a698b -r 13ec53a59a42 tools/python/xen/remus/save.py
--- a/tools/python/xen/remus/save.py    Fri Apr 08 16:40:58 2011 +0100
+++ b/tools/python/xen/remus/save.py    Fri Apr 08 16:49:04 2011 +0100
@@ -158,9 +158,13 @@
             self.checkpointer.open(self.vm.domid)
             self.checkpointer.start(self.fd, self.suspendcb, self.resumecb,
                                     self.checkpointcb, self.interval)
-            self.checkpointer.close()
         except xen.lowlevel.checkpoint.error, e:
             raise CheckpointError(e)
+        finally:
+            try: #errors in checkpoint close are not critical atm.
+                self.checkpointer.close()
+            except:
+                pass
 
     def _resume(self):
         """low-overhead version of XendDomainInfo.resumeDomain"""

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