From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40056) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XBu20-0008Cc-Tw for qemu-devel@nongnu.org; Mon, 28 Jul 2014 19:08:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XBu1v-0004AN-WF for qemu-devel@nongnu.org; Mon, 28 Jul 2014 19:08:36 -0400 Received: from mx1.redhat.com ([209.132.183.28]:9771) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XBu1v-0004AH-OD for qemu-devel@nongnu.org; Mon, 28 Jul 2014 19:08:31 -0400 Message-ID: <53D6D7EC.7090602@redhat.com> Date: Mon, 28 Jul 2014 17:08:28 -0600 From: Eric Blake MIME-Version: 1.0 References: <1406219965-13214-1-git-send-email-stefanha@redhat.com> <1406219965-13214-3-git-send-email-stefanha@redhat.com> <87ppgtvovi.fsf@blackfin.pond.sub.org> In-Reply-To: <87ppgtvovi.fsf@blackfin.pond.sub.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="jST099uBfg8R7V93qMUr88wLDl24pcmDb" Subject: Re: [Qemu-devel] [PATCH 2/3] qemu-char: add -chardev exit-on-eof option List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster , Stefan Hajnoczi Cc: qemu-devel@nongnu.org, Anthony Liguori , Andreas Faerber This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --jST099uBfg8R7V93qMUr88wLDl24pcmDb Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 07/25/2014 02:12 AM, Markus Armbruster wrote: > Stefan Hajnoczi writes: >=20 >> 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 resourc= es >> after their parent has died. >> ## >> -{ 'type': 'ChardevHostdev', 'data': { 'device' : 'str' } } >> +{ 'type': 'ChardevHostdev', 'data': { 'device' : 'str', >> + '*exit-on-eof' : 'bool' } } >> =20 >> ## >> # @ChardevSocket: >=20 > 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-s= et? >=20 > If no, should this be x-exit-on-eof? >=20 > 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'. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --jST099uBfg8R7V93qMUr88wLDl24pcmDb Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg iQEcBAEBCAAGBQJT1tfsAAoJEKeha0olJ0Nq1qQIAJOyRcxkGjSuyAMsjS/ccj8Q u/y0hsfSb4A8avhNpRspvkSqvuIiUajXQGvHGdABKRrafKDRgZYDjPj7JN+8gG1k m9m9FR0Il0zXrbOWWIWCYCI8G8I0avAKhw4dSsE0ZIXibM82qZ6yzlYA4EeMZDRQ C5/jNt2mgUS5BvvLXPqj7pPT2wCbMMqJLfNEjXkewFs4AJ0UgGA3SyTYfXQYlGOr Ims7hmIbWImVYj0M09Z0lhxYETo2ZTJLJKjFSZBZAMI6ML7p1RZUHTfMSy0wly/0 eyE3kB0xSJLJsfbGtZOiaV788bO3jiAPNLyckNCKOu24htR9F+JhGQpsqr4YMlU= =g/Gc -----END PGP SIGNATURE----- --jST099uBfg8R7V93qMUr88wLDl24pcmDb--