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

[Xen-changelog] [xen master] remus: don't do failover if we don't have a consistent state



commit 794347f5e3b5ce5b94a886f107cb04647aaac281
Author:     Wen Congyang <wency@xxxxxxxxxxxxxx>
AuthorDate: Tue Jan 19 15:17:37 2016 +0800
Commit:     Ian Campbell <ian.campbell@xxxxxxxxxx>
CommitDate: Wed Jan 20 17:08:36 2016 +0000

    remus: don't do failover if we don't have a consistent state
    
    We will have a consistent state when a CHECKPOINT_END record
    is received. After the first CHECKPOINT_END record is received,
    we will buffer all records until the next CHECKPOINT_END record
    is received. So if the checkpoint() callback returns 
XGR_CHECKPOINT_FAILOVER,
    we only can do failover if ctx->restore.buffer_all_records is
    true.
    
    Signed-off-by: Wen Congyang <wency@xxxxxxxxxxxxxx>
    Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
    Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
 tools/libxc/xc_sr_restore.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/tools/libxc/xc_sr_restore.c b/tools/libxc/xc_sr_restore.c
index 05159bb..6ccdab9 100644
--- a/tools/libxc/xc_sr_restore.c
+++ b/tools/libxc/xc_sr_restore.c
@@ -493,7 +493,11 @@ static int handle_checkpoint(struct xc_sr_context *ctx)
         break;
 
     case XGR_CHECKPOINT_FAILOVER:
-        rc = BROKEN_CHANNEL;
+        if ( ctx->restore.buffer_all_records )
+            rc = BROKEN_CHANNEL;
+        else
+            /* We don't have a consistent state */
+            rc = -1;
         goto err;
 
     default: /* Other fatal error */
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
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®.