On 05/29/2014 01:36 PM, Laszlo Ersek wrote: > In this series I try to implement the ideas that (I believe) were > suggested by Gerd and Amit in > <https://bugzilla.redhat.com/show_bug.cgi?id=1080376>. > > When the guest agent exits or dies (disconnects from the virtio-serial > port), the backend (eg. a host-side unix domain socket) doesn't (in > general, can't) reflect it. This lack of info tends to trip up libvirt > in some cases, waiting indefinitely for an agent that doesn't exist. > > The series adds two monitor events that report about virtio-serial ports > being opened and closed (for online notification), and extends the > "query-chardev" QMP command's return type with a "frontend_open" bool > (for querying at late libvirt startup).
Thinking about it a bit more, would it help to make the frontend_open a tri-state? It would be nice to know the difference between a guest that has no idea how to use the channel (has never opened it in the past; possibly because we're still too early in booting the guest) vs. a guest that has had a channel up at least once in its lifetime (presumably if it is back down, management deserves to be made aware that the guest agent is no longer behaving; meanwhile, a guest that has a systemd loop to re-establish the agent after any crash may be opening it back up shortly). That is, tracking 'unused', 'open', and 'closed', where the 'unused' state is default, but can only be left, and where the 'closed' state cannot be entered unless the 'open' state has occurred at least once. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature