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] [xen-4.1-testing] remus: proper cleanup on checkpoint fa

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-4.1-testing] remus: proper cleanup on checkpoint failure.
From: Xen patchbot-4.1-testing <patchbot@xxxxxxx>
Date: Tue, 26 Apr 2011 11:35:08 +0100
Delivery-date: Tue, 26 Apr 2011 03:35:28 -0700
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/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/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 Shriram Rajagopalan <rshriram@xxxxxxxxx>
# Date 1303734432 -3600
# Node ID 54c51e366c0a2742888f21607af200c8f8d4966d
# Parent  dbf2ddf652dc3dd927447e79ef4bc586de55d708
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>
xen-unstable changeset:   23195:13ec53a59a42
xen-unstable date:        Fri Apr 08 16:49:04 2011 +0100
---


diff -r dbf2ddf652dc -r 54c51e366c0a 
tools/python/xen/lowlevel/checkpoint/checkpoint.c
--- a/tools/python/xen/lowlevel/checkpoint/checkpoint.c Thu Apr 07 15:26:58 
2011 +0100
+++ b/tools/python/xen/lowlevel/checkpoint/checkpoint.c Mon Apr 25 13:27:12 
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 dbf2ddf652dc -r 54c51e366c0a tools/python/xen/remus/save.py
--- a/tools/python/xen/remus/save.py    Thu Apr 07 15:26:58 2011 +0100
+++ b/tools/python/xen/remus/save.py    Mon Apr 25 13:27:12 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-4.1-testing] remus: proper cleanup on checkpoint failure., Xen patchbot-4 . 1-testing <=