From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Daniel Xu <dxu@dxuuu.xyz>
Cc: kkostiuk@redhat.com, michael.roth@amd.com, qemu-devel@nongnu.org,
hmodi@aviatrix.com
Subject: Re: [PATCH 2/3] qga: Add optional stream-output argument to guest-exec
Date: Mon, 18 Sep 2023 16:14:47 +0100 [thread overview]
Message-ID: <ZQhpZ+2doxD7vaR8@redhat.com> (raw)
In-Reply-To: <604ef5fd5bda8acdb837b5d28ec405e9fb0332a3.1695034158.git.dxu@dxuuu.xyz>
On Mon, Sep 18, 2023 at 04:54:22AM -0600, Daniel Xu wrote:
> Currently, commands run through guest-exec are "silent" until they
> finish running. This is fine for short lived commands. But for commands
> that take a while, this is a bad user experience.
>
> Usually long running programs know that they will run for a while. To
> improve user experience, they will typically print some kind of status
> to output at a regular interval. So that the user knows that their
> command isn't just hanging.
>
> This commit adds support for an optional stream-output parameter to
> guest-exec. This causes subsequent calls to guest-exec-status to return
> all buffered output. This allows downstream applications to be able to
> relay "status" to the end user.
>
> If stream-output is requested, it is up to the guest-exec-status caller
> to keep track of the last seen output position and slice the returned
> output appropriately. This is fairly trivial for a client to do. And it
> is a more reliable design than having QGA internally keep track of
> position -- for the cases that the caller "loses" a response.
I can understand why you want this incremental output facility,
but at the same time I wonder where we draw the line for QGA
with users needing a real shell session instead.
When there is a long lived command, then IMHO it is also likely
that there will be a need to kill the background running command
too.
We quickly end up re-inventing a shell in QGA if we go down this
route.
With regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
next prev parent reply other threads:[~2023-09-18 15:16 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-18 10:54 [PATCH 0/3] qga: Add optional stream-output argument to guest-exec Daniel Xu
2023-09-18 10:54 ` [PATCH 1/3] qga: Fix memory leak when output stream is unused Daniel Xu
2023-09-21 9:55 ` Konstantin Kostiuk
2023-09-18 10:54 ` [PATCH 2/3] qga: Add optional stream-output argument to guest-exec Daniel Xu
2023-09-18 15:05 ` Markus Armbruster
2023-09-18 16:59 ` Daniel Xu
2023-09-18 15:14 ` Daniel P. Berrangé [this message]
2023-09-18 17:17 ` Daniel Xu
2023-09-27 8:43 ` Konstantin Kostiuk
2023-10-01 18:39 ` Daniel Xu
2023-09-18 10:54 ` [PATCH 3/3] qga: test: Add test for guest-exec stream-output Daniel Xu
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=ZQhpZ+2doxD7vaR8@redhat.com \
--to=berrange@redhat.com \
--cc=dxu@dxuuu.xyz \
--cc=hmodi@aviatrix.com \
--cc=kkostiuk@redhat.com \
--cc=michael.roth@amd.com \
--cc=qemu-devel@nongnu.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 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).