Message ID | 559CF016.4040101@huawei.com |
---|---|
State | New |
Headers | show |
zhanghailiang <zhang.zhanghailiang@huawei.com> 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? 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 <quintela@redhat.com> >> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> >> --- >> 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 }, >>
On 2015/7/8 19:06, Juan Quintela wrote: > zhanghailiang <zhang.zhanghailiang@huawei.com> 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? > In my test, the procedure is: - Start on host A (with -S) - Start on host B - migrate A to B. A reports that migration is completed. (info migrate), but actually, B is abort and reports the above error message. And yes, it is an uncommon case, but we usually use the above steps in our COLO startup, the reason is we need to keep the consistent of disks in master side and slave side, don't start A before go into COLO mode, (We usually copy the disk from master to slave before run qemu, and will not migrate block in COLO, of course, we can migrate block before go into COLO) So i think maybe it deserves fixing. Thanks, zhanghailiang > 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 <quintela@redhat.com> >>> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> >>> --- >>> 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 }, >>> > > . >
On 07/08/2015 07:06 PM, Juan Quintela wrote: > zhanghailiang <zhang.zhanghailiang@huawei.com> 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 <quintela@redhat.com> >>> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> >>> --- >>> 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 }, >>> > > . >
On 07/08/2015 07:06 PM, Juan Quintela wrote: > zhanghailiang <zhang.zhanghailiang@huawei.com> 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? What about this bug? Should we fix it in qemu-2.4? 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 <quintela@redhat.com> >>> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> >>> --- >>> 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 }, >>> > > . >
Wen Congyang <wency@cn.fujitsu.com> wrote: > On 07/08/2015 07:06 PM, Juan Quintela wrote: >> zhanghailiang <zhang.zhanghailiang@huawei.com> 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? > > What about this bug? Should we fix it in qemu-2.4? Is there any other scenary where it makes sense? My understanding from previous description is that we shouldn't allow migration in that state. I can be convinced of the contrary if you told me of a valid scenary. Please, more people chime in, one way or another. It is not that I have a strong opposition to it, just that I can't see the need. Thanks, Juan. > > 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 <quintela@redhat.com> >>>> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> >>>> --- >>>> 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 }, >>>> >> >> . >>
--- 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 },