On Mon, Sep 28, 2009 at 09:03:37PM -0500, Charles Duffy wrote: > Charles Duffy wrote: > >What I'm tempted to do is add a command which sends a sigil to stderr to > >the end of the exec: migration lines specified by libvirt, and wait for > >either that sigil or an error to show up in the log for that domain > >before issuing the cont; if my memory is at all correct, libvirt should > >have some helper functions useful for that purpose already available. > > Ugh, bad idea -- I was thinking only of the migrate-from-file case, and > not of migration from any alternate source; any non-exec source doesn't > allow for this hack. > > Anthony suggested dropping -S from the command line on incoming > migrations, and using "info status" to poll for when the guest resumes > itself; however, this doesn't work for cases when the VM was saved or > migrated in a paused state and the end-user expectation is for it to > remain paused. We can't drop -S, because we need to be able to run 'info cpus' and then do sched_setaffinity on each vCPU, before it ever starts executing, otherwise memory will end u pinned to the wrong NUMA nodes > I'm tempted to add additional output to "info migrate" indicating > whether an inbound migration is ongoing; however, this wouldn't help > versions of qemu without the patch applied. Yeah, I've been thinking much the same this morning. I think we should consider what the optimal setup is for our needs long term and try and do whatever we can for that in QEMU now. I think it'd definitely be worthwhile to have an 'info migrate' impl for incoming migration, and even to make '-incoming' optional, and add a 'migrate-incoming' command to the monitor, which like 'migrate' could be run in either blocking or non-blocking mode. For existing QEMU, it might be sufficient to just put an arbitrary 'sleep(5)' before issuing 'cont', which would at least give it a reasonable chance of avoiding the race condition. Regards, 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 :| -- Libvir-list mailing list Libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list