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

Re: [Xen-devel] [RFC 4/4] HACK libxl_exec: Check QEMU status via QMP instead of xenstore



On Tue, Mar 27, 2018 at 11:36:00AM +0100, Ian Jackson wrote:
> Anthony PERARD writes ("[RFC 4/4] HACK libxl_exec: Check QEMU status via QMP 
> instead of xenstore"):
> > This path is more of a prof of concept reather than a patch as this
> > would break qemu-trad.
> ...
> > For libxl, the only way to find out if qemu is ready on migrate/restore,
> > it is to connect to the QMP socket and run "query-status".
> > 
> > This patch succeed in implementing that, but QMP doesn't fit well with
> > the libxl__ev_* infrastructure. One main issue would be qmp_open(), it
> > tries to connect to the QMP socket during 5 seconds without ever giving
> > back the hand to libxl.
> 
> There are two problems here, I think.  The first one is an internal
> libxl api issue: ie, that the libxl qmp code does not have the proper
> callback-style API.  That can be fixed inside libxl, although it's
> probably annoying.
> 
> The second is that AFAICT there is no way other than xenstore to get a
> notification of any kind when qemu is ready.  So the only possible
> approach is polling.  That's pretty nasty.  I haven't looked at the
> qemu code in detail to check if this is really true.  Perhaps looking
> at libvirt would give us a clue...

Actually, I think that once connected to QMP, we can get "events" from
QEMU. And there is an event for when qemu changes it's status.

So I guess one workflow we could adopt is:
- try connect to QMP socket
- "query-status", to check current status
- keep listening for events.

I'll try to find out if libvirt is doing anything for that.

-- 
Anthony PERARD

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.