[Libvir] Restarting of libvirt_qemud daemon

Richard W.M. Jones rjones at redhat.com
Fri Mar 9 14:02:55 UTC 2007


Richard W.M. Jones wrote:
> Daniel P. Berrange wrote:
>> On Fri, Mar 09, 2007 at 10:47:18AM +0000, Richard W.M. Jones wrote:
>>> Daniel P. Berrange wrote:
>>>> Thinking about later RPM upgrades I think we need to think about 
>>>> whether it
>>>> will be possible to restart the libvirt_qemud while guests & 
>>>> networks are
>>>> running. There's a couple of issues:
>>>>
>>>> - We do waitpid() to cleanup qemu & dnsmasq processes when we stop 
>>>> domains
>>>>   & networks, or to detect when they crash. For the former, we could 
>>>> may
>>>>   they daemons to avoid waitpid() cleanup, but we'd still need 
>>>> waitpid to
>>>>   be able to detect shutdowns. There is also the issue of enumerating
>>>>   running instances.
>>> Maybe I'm missing something big here, but how would libvirt_qemud 
>>> regain connections to the running qemu monitor ptys?
>>
>> That's one of the challenges to be addressed :-)  Fortunately the monitor
>> is set to be exposed via /dev/pty/XXX, so if the restarted client can
>> find out the path to the PTY, then it can re-open it. Maybe we just need
>> to record a state file somewhere containing a PID & PTY path. 
> 
> Is it possible to start qemu with something like:
> 
>   qemu -monitor pipe:/var/some/known/place/pipe.UUID
> 
> and then just look in /var/some/known/place/ in order to find the 
> running instances?

I should add a note that you can tell if the qemu at the other end of 
the pipe has died by opening the pipe and writing something, for example 
a NO-OP command.  If you get EPIPE (or SIGPIPE if you weren't careful to 
disable the signal) you can delete the pipe device.

Rich.

-- 
Emerging Technologies, Red Hat  http://et.redhat.com/~rjones/
64 Baker Street, London, W1U 7DF     Mobile: +44 7866 314 421
  "[Negative numbers] darken the very whole doctrines of the equations
  and make dark of the things which are in their nature excessively
  obvious and simple" (Francis Maseres FRS, mathematician, 1759)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3237 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20070309/ff2cdfca/attachment-0001.bin>


More information about the libvir-list mailing list