qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Markus Armbruster <armbru@redhat.com>,
	Stefan Hajnoczi <stefanha@redhat.com>
Cc: qemu-devel@nongnu.org, Anthony Liguori <aliguori@amazon.com>,
	Andreas Faerber <afaerber@suse.de>
Subject: Re: [Qemu-devel] [PATCH 2/3] qemu-char: add -chardev exit-on-eof option
Date: Mon, 28 Jul 2014 17:08:28 -0600	[thread overview]
Message-ID: <53D6D7EC.7090602@redhat.com> (raw)
In-Reply-To: <87ppgtvovi.fsf@blackfin.pond.sub.org>

[-- Attachment #1: Type: text/plain, Size: 2272 bytes --]

On 07/25/2014 02:12 AM, Markus Armbruster wrote:
> Stefan Hajnoczi <stefanha@redhat.com> writes:
> 
>> When QEMU is executed as part of a test case or from a script, it is
>> usually desirable to exit if the parent process terminates.  This
>> ensures that "leaked" QEMU processes do not continue consuming resources
>> after their parent has died.

>>  ##
>> -{ 'type': 'ChardevHostdev', 'data': { 'device' : 'str' } }
>> +{ 'type': 'ChardevHostdev', 'data': { 'device' : 'str',
>> +                                      '*exit-on-eof' : 'bool' } }
>>  
>>  ##
>>  # @ChardevSocket:
> 
> Any use cases beyond libqtest?

Libvirt probably won't use it for normal guests (we don't want to kill
qemu just because the monitor disconnects), but does have the notion of
an autodestroy guest where it might be useful (we WANT the guest to go
away if libvirtd dies early).  In fact, autodestroy guests are used
during migration - we want to kill qemu on the destination side if
libvirtd dies before the source side finishes sending the migration
stream.  But in that scenario, once migration succeeds, libvirt has to
be able to convert an autodestroy guest back into a normal guest that no
longer disappears when libvirtd does; would this be something that QMP
can toggle the state of this attribute on the fly?  Perhaps through qom-set?

> 
> If no, should this be x-exit-on-eof?
> 
> Hmm, looks like there's no precedence for x- in QAPI.

Ah, but we do.  For example, x-rdma-pin-all in MigrationCapability in
qemu 1.7; which has later been removed.

However, we also have precedence of actions in QAPI that are very
unlikely to be used outside of qtest, but which are not marked
experimental; for example, the 'Abort' action in 'transaction' will
probably never be used by libvirt (but as I type that, the thought in
the back of my mind is that I could possibly do some sort of feature
probing by setting up a transaction that will abort, and distinguish
between whether the transaction aborted or whether it errored out
because the feature I'm probing for isn't present).

I'm fine leaving this as plain 'exit-on-eof'.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 539 bytes --]

  parent reply	other threads:[~2014-07-28 23:08 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-24 16:39 [Qemu-devel] [PATCH 0/3] libqtest: solve QEMU process cleanup problem Stefan Hajnoczi
2014-07-24 16:39 ` [Qemu-devel] [PATCH 1/3] libqemustub: add qemu_system_shutdown_request() and no_shutdown Stefan Hajnoczi
2014-07-24 17:07   ` Peter Maydell
2014-07-25  9:42     ` Stefan Hajnoczi
2014-07-24 16:39 ` [Qemu-devel] [PATCH 2/3] qemu-char: add -chardev exit-on-eof option Stefan Hajnoczi
2014-07-25  8:12   ` Markus Armbruster
2014-07-25  9:39     ` Stefan Hajnoczi
2014-07-28 23:08     ` Eric Blake [this message]
2014-07-29  6:12       ` Markus Armbruster
2014-07-29 12:58         ` Eric Blake
2014-07-29 14:41           ` Markus Armbruster
2014-07-24 16:39 ` [Qemu-devel] [PATCH 3/3] libqtest: use -chardev exit-on-eof to clean up QEMU Stefan Hajnoczi

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=53D6D7EC.7090602@redhat.com \
    --to=eblake@redhat.com \
    --cc=afaerber@suse.de \
    --cc=aliguori@amazon.com \
    --cc=armbru@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).