From: Anthony PERARD <anthony.perard@citrix.com>
To: Ian Jackson <ian.jackson@citrix.com>
Cc: xen-devel@lists.xenproject.org, Wei Liu <wei.liu2@citrix.com>
Subject: Re: [RFC 4/4] HACK libxl_exec: Check QEMU status via QMP instead of xenstore
Date: Tue, 27 Mar 2018 12:13:03 +0100 [thread overview]
Message-ID: <20180327111303.GA5743@perard> (raw)
In-Reply-To: <23226.7824.260388.684497@mariner.uk.xensource.com>
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@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
next prev parent reply other threads:[~2018-03-27 11:13 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-26 18:33 [RFC 0/4] libxl: Enable save/restore/migration of a restricted QEMU Anthony PERARD
2018-03-26 18:33 ` [RFC 1/4] libxl: Learned to send FD through QMP to QEMU Anthony PERARD
2018-03-27 10:29 ` Ian Jackson
2018-03-27 10:58 ` George Dunlap
2018-03-27 11:49 ` Anthony PERARD
2018-04-16 16:11 ` Anthony PERARD
2018-03-26 18:33 ` [RFC 2/4] libxl: Have QEMU save its state to a file descriptor Anthony PERARD
2018-03-26 18:34 ` [RFC 3/4] libxl_qmp: Implement query-status command Anthony PERARD
2018-03-26 18:34 ` [RFC 4/4] HACK libxl_exec: Check QEMU status via QMP instead of xenstore Anthony PERARD
2018-03-27 10:36 ` Ian Jackson
2018-03-27 11:13 ` Anthony PERARD [this message]
2018-03-27 13:43 ` Ian Jackson
2018-03-27 14:20 ` Anthony PERARD
2018-03-27 14:48 ` Ian Jackson
2018-03-27 17:58 ` Anthony PERARD
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180327111303.GA5743@perard \
--to=anthony.perard@citrix.com \
--cc=ian.jackson@citrix.com \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.