All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrange" <berrange@redhat.com>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: Chris Lalancette <clalance@redhat.com>, kvm-devel <kvm@vger.kernel.org>
Subject: Re: [PATCH]: Add a "migrate_incoming" monitor option
Date: Fri, 1 Aug 2008 09:42:34 +0100	[thread overview]
Message-ID: <20080801084234.GD23993@redhat.com> (raw)
In-Reply-To: <4891F60F.9060200@codemonkey.ws>

On Thu, Jul 31, 2008 at 12:27:43PM -0500, Anthony Liguori wrote:
> Chris Lalancette wrote:
> >We've been trying to plumb libvirt to do KVM migration.  One of the 
> >stumbling
> >blocks we are running into, however, is that libvirt expects to be able to 
> >use
> >the Qemu monitor both before and after migration has taken place, on both 
> >the
> >source and destination nodes.  After migration has taken place is no 
> >problem; we
> >return to the main qemu select() loop, and we can run monitor commands.
> >However, before migration, on the destination side, when we start qemu 
> >with a
> >command-line like:
> >
> >qemu-kvm -M pc -S blah blah -incoming tcp://0:4444
> >
> >we can't run any monitor commands since the migration code is synchronously
> >waiting for an incoming tcp connection.  To get around this, the following 
> >patch
> >adds a new monitor command called "migrate_incoming"; it takes all of the 
> >same
> >parameters as the command-line option, but just starts it later.  To make 
> >sure
> >it is safe, you actually have to start with "-incoming monitor"; if you 
> >run it
> >without that, it will just spit an error at you.  So with this in place, 
> >libvirt
> >can do the equivalent of:
> >
> >qemu-kvm -M pc -S blah blah -incoming monitor
> >  
> 
> I think adding a 'nowait' parameter to migration would make more sense 
> than introducing a monitor command.
> 
> So:
> 
> qemu-kvm -M pc -S blah blah -incoming tcp://0:4444,nowait
> 
> From an implementation perspective, it's just a matter of setting a 
> callback for the accept fd I imagine.

An accept trick only handles the TCP case though. I know this was Chris'
example that we're currently using, but we intend to switch to passing 
an open file descriptor instead, and proxying the data via a secure 
channel instead of the plain tcp, or builtin SSH tunnelling. 

With an open FD we'll need another way - I guess just registering a
event on POLLIN might do the trick. It seems to me that just having
an explicit migrate incoming monitor command would be simpler than having
to code different triggers to implement 'nowait' for each transport
we have.
 
Daniel
-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

  reply	other threads:[~2008-08-01  8:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-31 14:50 [PATCH]: Add a "migrate_incoming" monitor option Chris Lalancette
2008-07-31 15:11 ` Daniel P. Berrange
2008-08-01  9:09   ` Chris Lalancette
2008-07-31 17:27 ` Anthony Liguori
2008-08-01  8:42   ` Daniel P. Berrange [this message]
2008-08-01  9:04     ` Chris Lalancette

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=20080801084234.GD23993@redhat.com \
    --to=berrange@redhat.com \
    --cc=anthony@codemonkey.ws \
    --cc=clalance@redhat.com \
    --cc=kvm@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.