From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53624) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZD1Kg-0002R1-8a for qemu-devel@nongnu.org; Wed, 08 Jul 2015 22:13:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZD1KS-0001W1-VM for qemu-devel@nongnu.org; Wed, 08 Jul 2015 22:13:02 -0400 Received: from [59.151.112.132] (port=33867 helo=heian.cn.fujitsu.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZD1KS-0001VP-KO for qemu-devel@nongnu.org; Wed, 08 Jul 2015 22:12:48 -0400 Message-ID: <559DD98E.1050601@cn.fujitsu.com> Date: Thu, 9 Jul 2015 10:16:46 +0800 From: Wen Congyang MIME-Version: 1.0 References: <1436274549-28826-1-git-send-email-quintela@redhat.com> <1436274549-28826-15-git-send-email-quintela@redhat.com> <559CF016.4040101@huawei.com> <87io9uoqna.fsf@neno.neno> In-Reply-To: <87io9uoqna.fsf@neno.neno> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PULL 14/28] runstate: migration allows more transitions now List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: quintela@redhat.com, zhanghailiang Cc: amit.shah@redhat.com, qemu-devel@nongnu.org, peter.huangpeng@huawei.com On 07/08/2015 07:06 PM, Juan Quintela wrote: > zhanghailiang wrote: >> Hi, >> >> If testing migration with '-S' for qemu command line, (migrate >> directly without executing 'cont' command), >> qemu process in the destination will abort with the follow message: >> >> ERROR: invalid runstate transition: 'inmigrate' -> 'prelaunch' >> Aborted >> >> After the follow modification, it will be OK. Is this need to be fix ? > > but this is a "werid" case. basically it means that > > - we start on host A > - we start on host B (with -S) > - we migrate from A to B > - now we migrate from B to C without running at all on B > > Or I am missing something? - we start on host A (with -S) - we start on host B - we migrate from A to B It is a werid case, but it is very useful for HA/FT, we use the -S option to avoid do block migration. Thanks Wen Congyang > > Later, Juan. > > >> >> --- a/vl.c >> +++ b/vl.c >> @@ -583,6 +583,7 @@ static const RunStateTransition runstate_transitions_def[] = { >> { RUN_STATE_INMIGRATE, RUN_STATE_WATCHDOG }, >> { RUN_STATE_INMIGRATE, RUN_STATE_GUEST_PANICKED }, >> + { RUN_STATE_INMIGRATE, RUN_STATE_PRELAUNCH }, >> >> { RUN_STATE_INTERNAL_ERROR, RUN_STATE_PAUSED }, >> { RUN_STATE_INTERNAL_ERROR, RUN_STATE_FINISH_MIGRATE }, >> >> >> Thanks, >> zhanghailiang >> >> On 2015/7/7 21:08, Juan Quintela wrote: >>> Next commit would allow to move from incoming migration to error happening on source. >>> >>> Should we add more states to this transition? Luiz? >>> >>> Signed-off-by: Juan Quintela >>> Reviewed-by: Dr. David Alan Gilbert >>> --- >>> vl.c | 8 +++++++- >>> 1 file changed, 7 insertions(+), 1 deletion(-) >>> >>> diff --git a/vl.c b/vl.c >>> index fec7e93..19a8737 100644 >>> --- a/vl.c >>> +++ b/vl.c >>> @@ -573,8 +573,14 @@ static const RunStateTransition runstate_transitions_def[] = { >>> { RUN_STATE_DEBUG, RUN_STATE_RUNNING }, >>> { RUN_STATE_DEBUG, RUN_STATE_FINISH_MIGRATE }, >>> >>> - { RUN_STATE_INMIGRATE, RUN_STATE_RUNNING }, >>> + { RUN_STATE_INMIGRATE, RUN_STATE_INTERNAL_ERROR }, >>> + { RUN_STATE_INMIGRATE, RUN_STATE_IO_ERROR }, >>> { RUN_STATE_INMIGRATE, RUN_STATE_PAUSED }, >>> + { RUN_STATE_INMIGRATE, RUN_STATE_RUNNING }, >>> + { RUN_STATE_INMIGRATE, RUN_STATE_SHUTDOWN }, >>> + { RUN_STATE_INMIGRATE, RUN_STATE_SUSPENDED }, >>> + { RUN_STATE_INMIGRATE, RUN_STATE_WATCHDOG }, >>> + { RUN_STATE_INMIGRATE, RUN_STATE_GUEST_PANICKED }, >>> >>> { RUN_STATE_INTERNAL_ERROR, RUN_STATE_PAUSED }, >>> { RUN_STATE_INTERNAL_ERROR, RUN_STATE_FINISH_MIGRATE }, >>> > > . >