Re: [PATCH 1/2] qemu: make sure capability probing process can start

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Oct 09, 2014 at 10:14:48AM +0100, Daniel P. Berrange wrote:
> On Thu, Oct 09, 2014 at 09:58:30AM +0200, Martin Kletzander wrote:
> > When daemon is killed right in the middle of probing a qemu binary for
> > its capabilities, the VM is left running.  Next time the daemon is
> > starting, it cannot start qemu process because the one that's already
> > running does have the pidfile flock()'d.
> 
> I was wondering if there's anything we can easily change in the way
> we launch the QEMU binary so that it automatically dies when libvirtd
> exits, rather than us needing to manually kill it.

FWIW libguestfs (in non-libvirt mode) spawns off a recovery process
that is just there to kill qemu if the parent process goes away
without closing qemu properly.  This has Just Worked all the time we
have been using libguestfs.

Code:

https://github.com/libguestfs/libguestfs/blob/master/src/launch-direct.c#L746

> Another idea would be to play with adding '-serial stdio' and then
> when libvirt died stdio would get a broken pipe but I don't think
> it is safe to use -serial when we have -M none so that's out.

libguestfs uses -serial stdio but qemu doesn't die if the pipe is
broken.  Hence need for above.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://people.redhat.com/~rjones/virt-top

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]