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/
Home Products Support Community News


[Xen-devel] [PATCH] remus: proper cleanup on checkpoint failure

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] remus: proper cleanup on checkpoint failure
From: Shriram Rajagopalan <rshriram@xxxxxxxxx>
Date: Thu, 07 Apr 2011 13:05:22 -0700
Delivery-date: Thu, 07 Apr 2011 13:06:40 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mercurial-patchbomb/1.4.3
# HG changeset patch
# User Shriram Rajagopalan <rshriram@xxxxxxxxx>
# Date 1302204999 25200
# Node ID a73514445065390ae70c44e1708971dd6fa2a6f0
# Parent  97763efc41f9b664cf6f7db653c9c3f51e50b358
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>

diff -r 97763efc41f9 -r a73514445065 
--- a/tools/python/xen/lowlevel/checkpoint/checkpoint.c Tue Apr 05 18:23:54 
2011 +0100
+++ b/tools/python/xen/lowlevel/checkpoint/checkpoint.c Thu Apr 07 12:36:39 
2011 -0700
@@ -80,6 +80,9 @@
   CheckpointObject* self = (CheckpointObject*)obj;
+  if (checkpoint_resume(&self->cps) < 0)
+    fprintf(stderr, "%s\n", checkpoint_error(&self->cps));
diff -r 97763efc41f9 -r a73514445065 tools/python/xen/remus/save.py
--- a/tools/python/xen/remus/save.py    Tue Apr 05 18:23:54 2011 +0100
+++ b/tools/python/xen/remus/save.py    Thu Apr 07 12:36:39 2011 -0700
@@ -158,9 +158,13 @@
             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-devel mailing list

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