From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hongyang Yang Subject: Re: [RFC PATCH 11/17] COLO ctl: implement colo checkpoint protocol Date: Fri, 12 Sep 2014 19:40:20 +0800 Message-ID: <5412DBA4.1060408@cn.fujitsu.com> References: <1406125538-27992-1-git-send-email-yanghy@cn.fujitsu.com> <1406125538-27992-12-git-send-email-yanghy@cn.fujitsu.com> <20140801150347.GE2430@work-vm> <541290C5.4010905@cn.fujitsu.com> <20140912111722.GD2413@work-vm> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: , , , , , To: "Dr. David Alan Gilbert" Return-path: Received: from cn.fujitsu.com ([59.151.112.132]:51318 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1752797AbaILLk3 convert rfc822-to-8bit (ORCPT ); Fri, 12 Sep 2014 07:40:29 -0400 In-Reply-To: <20140912111722.GD2413@work-vm> Sender: kvm-owner@vger.kernel.org List-ID: =E5=9C=A8 09/12/2014 07:17 PM, Dr. David Alan Gilbert =E5=86=99=E9=81=93= : > * Hongyang Yang (yanghy@cn.fujitsu.com) wrote: >> >> >> ??? 08/01/2014 11:03 PM, Dr. David Alan Gilbert ??????: >>> * Yang Hongyang (yanghy@cn.fujitsu.com) wrote: > > > >>>> +static int do_colo_transaction(MigrationState *s, QEMUFile *contr= ol, >>>> + QEMUFile *trans) >>>> +{ >>>> + int ret; >>>> + >>>> + ret =3D colo_ctl_put(s->file, COLO_CHECKPOINT_NEW); >>>> + if (ret) { >>>> + goto out; >>>> + } >>>> + >>>> + ret =3D colo_ctl_get(control, COLO_CHECKPOINT_SUSPENDED); >>> >>> What happens at this point if the slave just doesn't respond? >>> (i.e. the socket doesn't drop - you just don't get the byte). >> >> If the socket return bytes that were not expected, exit. If >> socket return error, do some cleanup and quit COLO process. >> refer to: colo_ctl_get() and colo_ctl_get_value() > > But what happens if the slave just doesn't respond at all; e.g. > if the slave host loses power, it'll take a while (many seconds) > before the socket will timeout. It will wait until the call returns timeout error, and then do some cleanup and quit COLO process. There may be better way to handle this? > > Dave > -- > Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK > . > --=20 Thanks, Yang.