All of lore.kernel.org
 help / color / mirror / Atom feed
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 18:58:26 +0100	[thread overview]
Message-ID: <20180327175826.GG2208@perard> (raw)
In-Reply-To: <23226.22973.741253.350174@mariner.uk.xensource.com>

On Tue, Mar 27, 2018 at 03:48:29PM +0100, Ian Jackson wrote:
> Anthony PERARD writes ("Re: [Xen-devel] [RFC 4/4] HACK libxl_exec: Check QEMU status via QMP instead of xenstore"):
> > On Tue, Mar 27, 2018 at 02:43:22PM +0100, Ian Jackson wrote:
> > > Right, but doesn't one still have to poll on connect() ?
> > 
> > Yes, we need to poll on connect().
> > 
> > libvirt those it also to open the socket:
> > https://libvirt.org/git/?p=libvirt.git;a=blob;f=src/qemu/qemu_monitor.c;h=e169553b7e1781da307ddb0be23fed5540baf36c;hb=HEAD#l375
> 
> Urgh.  Maybe we could fix this in qemu, or do some kind of hack.
> 
> For example, maybe we could instruct qemu to open some file or other,
> which is actually a pipe.  If it would happen late enought (after the
> qmp socket is set up).

I think that can be done.

If we add something like:
'-chardev','pipe,id=inotify,path=/tmp/pipe',
'-mon','chardev=inotify,mode=control',

And we just needs to wait until qemu write the QMP greating into the
pipe. At this point, the socket we cared for exist.

That /tmp/pipe can actually be a fd, I did not test it, only read the
code:
'-add-fd','fd=fd,set=1',
'-chardev','pipe,id=inotify,path=/dev/fdset/1',

I just need to write some code in libxl now.

-- 
Anthony PERARD

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

      reply	other threads:[~2018-03-27 17:59 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
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 [this message]

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=20180327175826.GG2208@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.