From: Amit Shah <amit.shah@redhat.com>
To: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
Cc: Jason Wang <jasowang@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
qemu list <qemu-devel@nongnu.org>,
Juan Quintela <quintela@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 1/1] migration: announce VM's new home just before VM is runnable
Date: Wed, 14 Oct 2015 18:36:07 +0530 [thread overview]
Message-ID: <20151014130607.GB31081@grmbl.mre> (raw)
In-Reply-To: <20151014123829.GC2571@work-vm>
On (Wed) 14 Oct 2015 [13:38:30], Dr. David Alan Gilbert wrote:
> * Amit Shah (amit.shah@redhat.com) wrote:
> > We were announcing the dest host's IP as our new IP a bit too soon -- if
> > there were errors detected after this announcement was done, the
> > migration is failed and the VM could continue running on the src host --
> > causing problems later.
> >
> > Move around the qemu_announce_self() call so it's done just before the
> > VM is runnable.
> >
> > Signed-off-by: Amit Shah <amit.shah@redhat.com>
> > ---
> > migration/migration.c | 7 ++++++-
> > 1 file changed, 6 insertions(+), 1 deletion(-)
> >
> > diff --git a/migration/migration.c b/migration/migration.c
> > index b7de9b7..ca21ba8 100644
> > --- a/migration/migration.c
> > +++ b/migration/migration.c
> > @@ -295,7 +295,6 @@ static void process_incoming_migration_co(void *opaque)
> > exit(EXIT_FAILURE);
> > }
> > migrate_generate_event(MIGRATION_STATUS_COMPLETED);
> > - qemu_announce_self();
> >
> > /* Make sure all file formats flush their mutable metadata */
> > bdrv_invalidate_cache_all(&local_err);
> > @@ -305,6 +304,12 @@ static void process_incoming_migration_co(void *opaque)
> > exit(EXIT_FAILURE);
> > }
> >
> > + /*
> > + * This must happen after all error conditions are dealt with and
> > + * we're sure the VM is going to be running on this host.
> > + */
> > + qemu_announce_self();
> > +
>
> OK, so that's certainly better than it was before; but should be even
> further down? Should we do an announce-self at all if we are not
> going to do the vm_start?
Assumption is that if migration has succeeded, the VM will be started
on this host. The VM is paused only because it was in paused state
before the migration started -- due to an IO error, due to non-live
migration -- so IMO this actually is the right place for that.
Amit
next prev parent reply other threads:[~2015-10-14 13:06 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-14 12:07 [Qemu-devel] [PATCH 1/1] migration: announce VM's new home just before VM is runnable Amit Shah
2015-10-14 12:16 ` Michael S. Tsirkin
2015-10-14 12:38 ` Dr. David Alan Gilbert
2015-10-14 13:06 ` Amit Shah [this message]
2015-10-14 13:21 ` Juan Quintela
2015-10-14 14:12 ` Michael S. Tsirkin
2015-10-15 1:54 ` Jason Wang
2015-10-15 6:01 ` Amit Shah
2015-10-15 6:36 ` Juan Quintela
2015-10-15 8:04 ` Amit Shah
2015-10-15 8:19 ` Michael S. Tsirkin
2015-10-15 1:50 ` Jason Wang
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=20151014130607.GB31081@grmbl.mre \
--to=amit.shah@redhat.com \
--cc=dgilbert@redhat.com \
--cc=jasowang@redhat.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
/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).