mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 10:11:27 +01:00
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@cs.ubc.ca> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
This commit is contained in:
1 parent
be1806baf4
commit
d732509e34
2 files changed
+8
-1
No files matched your search
@@ -80,6 +80,9 @@ static PyObject* pycheckpoint_close(PyObject* obj, PyObject* args)
|
||||
{
|
||||
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);
|
||||
|
||||
@@ -158,9 +158,13 @@ class Saver(object):
|
||||
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"""
|
||||
|
||||