From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hongyang Yang Subject: Re: [PATCH] fix Remus failover regression Date: Mon, 28 Jul 2014 12:20:25 +0800 Message-ID: <53D5CF89.3050108@cn.fujitsu.com> References: <1406518544-27346-1-git-send-email-yanghy@cn.fujitsu.com> <53D5CBFB.30701@cn.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <53D5CBFB.30701@cn.fujitsu.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Wen Congyang , xen-devel@lists.xen.org Cc: Shriram Rajagopalan , Andrew Cooper , Ian Jackson , Ian Campbell List-Id: xen-devel@lists.xenproject.org On 07/28/2014 12:05 PM, Wen Congyang wrote: > At 07/28/2014 11:35 AM, Yang Hongyang Write: >> commit: c2ba706c >> tools/libxc: goto correct label on error paths by Andrew broke >> Remus in Xen 4.4 or earlier versions that has this commit backported. >> >> With Remus, this jump essentially discards the last incomplete >> checkpoint received by the backup. >> This is required for Remus to work and this does not break live >> migration. >> >> CC: Ian Jackson >> CC: Ian Campbell >> CC: Andrew Cooper >> CC: Shriram Rajagopalan >> Signed-off-by: Yang Hongyang >> --- >> tools/libxc/xc_domain_restore.c | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/tools/libxc/xc_domain_restore.c b/tools/libxc/xc_domain_restore.c >> index e73e0a2..5d2fbd6 100644 >> --- a/tools/libxc/xc_domain_restore.c >> +++ b/tools/libxc/xc_domain_restore.c >> @@ -1783,14 +1783,14 @@ int xc_domain_restore(xc_interface *xch, int io_fd, uint32_t dom, >> >> if ( pagebuf_get(xch, ctx, &pagebuf, io_fd, dom) ) { >> PERROR("error when buffering batch, finishing"); >> - goto out; >> + goto finish; >> } >> memset(&tmptail, 0, sizeof(tmptail)); >> tmptail.ishvm = hvm; >> if ( buffer_tail(xch, ctx, &tmptail, io_fd, max_vcpu_id, vcpumap, >> ext_vcpucontext, vcpuextstate_size) < 0 ) { >> ERROR ("error buffering image tail, finishing"); >> - goto out; >> + goto finish; >> } >> tailbuf_free(&tailbuf); >> memcpy(&tailbuf, &tmptail, sizeof(tailbuf)); >> > > The mail is here: > http://lists.xenproject.org/archives/html/xen-devel/2014-01/msg02299.html > >> Both of these errors have been discovered by xc_domain_restore() returning >> success after suffering a fatal error during migration, leading to the >> toolstack believing that the VM migrated successfully. > > These codes are only for Remus. So, why these codes are executed by migration? I was confused also, without Remus, these two error path will not be hitted I think, without Remus, migration will ended at: 1776 if ( ctx->last_checkpoint ) 1777 { 1778 // DPRINTF("Last checkpoint, finishing\n"); 1779 goto finish; 1780 } > > Thanks > Wen Congyang > > > . > -- Thanks, Yang.