qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Glauber Costa <glommer@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Anthony Liguori <aliguori@us.ibm.com>, qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: [PATCH alternative] fix migration to obey -S
Date: Mon, 27 Jul 2009 18:29:23 -0300	[thread overview]
Message-ID: <20090727212923.GO4776@poweredge.glommer> (raw)
In-Reply-To: <1248729471-5403-1-git-send-email-pbonzini@redhat.com>

On Mon, Jul 27, 2009 at 11:17:51PM +0200, Paolo Bonzini wrote:
> Since migration returns right away, starting the VM right
> after calling qemu_start_incoming_migration is wrong even
> if -S is not passed.  We have to do this after migration
> has completed.
> 
> Cc: Glauber Costa  <glommer@redhat.com>
> Cc: Anthony Liguori  <aliguori@us.ibm.com>
> ---
> 	This implements the other semantics that glommer
> 	also agreed were nice to have.
> 
>  migration-exec.c |    2 ++
>  migration-tcp.c  |    2 ++
>  sysemu.h         |    1 +
>  vl.c             |    4 ++--
>  4 files changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/migration-exec.c b/migration-exec.c
> index e472979..6249b93 100644
> --- a/migration-exec.c
> +++ b/migration-exec.c
> @@ -118,6 +118,8 @@ static void exec_accept_incoming_migration(void *opaque)
>      dprintf("successfully loaded vm state\n");
>      /* we've successfully migrated, close the fd */
>      qemu_set_fd_handler2(qemu_popen_fd(f), NULL, NULL, NULL, NULL);
> +    if (autostart)
> +        vm_start();
>  
>  err:
>      qemu_fclose(f);
> diff --git a/migration-tcp.c b/migration-tcp.c
> index 7a87a1e..d3feb85 100644
> --- a/migration-tcp.c
> +++ b/migration-tcp.c
> @@ -166,6 +166,8 @@ static void tcp_accept_incoming_migration(void *opaque)
>      /* we've successfully migrated, close the server socket */
>      qemu_set_fd_handler2(s, NULL, NULL, NULL, NULL);
>      close(s);
> +    if (autostart)
> +        vm_start();
>  

Hummm,, those are a little bit weird. I'd expect it to be a characteristic of the
source machine, no the destination. IOW, if the machine was running prior to migration,
it should be running after it, and if it was stopped prior to migration, it should be
stopped after it.

Having dst flags to tamper this seems only confusing to me.

  reply	other threads:[~2009-07-27 21:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-24 20:20 [Qemu-devel] [PATCH] fix broken migration Glauber Costa
2009-07-25  1:37 ` [Qemu-devel] " Paolo Bonzini
2009-07-27 18:02   ` Glauber Costa
2009-07-27 19:31     ` Paolo Bonzini
2009-07-27 20:18       ` Glauber Costa
2009-07-27 21:08         ` [Qemu-devel] [PATCH] fix migration to not require -S Paolo Bonzini
2009-07-27 21:17         ` [Qemu-devel] [PATCH alternative] fix migration to obey -S Paolo Bonzini
2009-07-27 21:29           ` Glauber Costa [this message]
2009-07-27 21:36             ` [Qemu-devel] " Anthony Liguori
2009-07-27 23:15               ` Glauber Costa
2009-07-27 23:13                 ` Anthony Liguori

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090727212923.GO4776@poweredge.glommer \
    --to=glommer@redhat.com \
    --cc=aliguori@us.ibm.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).