Re: Restarting of libvirt_qemud daemon

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

 



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)

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


[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]