From: Eric Blake <eblake@redhat.com>
To: Michal Privoznik <mprivozn@redhat.com>
Cc: libvir-list@redhat.com, "MATSUDA,
Daiki" <matsudadik@intellilink.co.jp>,
QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH 0/5] support guest agent general command
Date: Tue, 21 Aug 2012 09:55:39 -0600 [thread overview]
Message-ID: <5033AF7B.40001@redhat.com> (raw)
In-Reply-To: <5033A89C.40009@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 2450 bytes --]
On 08/21/2012 09:26 AM, Michal Privoznik wrote:
>> Question to the qemu folks - can we enhance 'guest-info' to tell us
>> commands required to give output on success, vs. commands that are
>> expected to never answer (except on possible error), so that libvirt can
>> then make smarter decisions about whether to wait for a response for an
>> arbitrary guest agent command?
> Even if I'd gladly eliminate this --timeout I am not so sure we can do
> that. Even if qemu-ga will report which commands does reply on success.
> I guess this is the image you had in mind:
> 1) user issues command X
> 2) libvirt asks qemu-ga if X returns an success reply
2b - if no answer to guest-info in a reasonable timeout, assume guest
agent is not running, and return from API immediately
> 3a) if it does, wait for it
although a timeout is still useful here, since the guest agent can go
away at any time.
> 3b) if it doesn't just write command into agent's socket. Asynchronously.
> 4) return from API
>
> Well, current version of qemu-ga doesn't report this kind of info yet
> (patch against qemu-ga has been submitted). So in step #3 we can't
> decide whether to go with A or B path. And we can't wait for monitor
> event like we do now for those commands not replying on success - this
> command needs to be as general as possible.
Perhaps we can be sticklers, and refuse to run arbitrary qemu-ga
commands against a guest agent that doesn't report enough information.
After all, the libvirt addition of 'virsh qemu-guest-agent-command' is
intended as a debugging aid and future development testbed, rather than
a supported libvirt interface, and when you are debugging, it is okay to
require the latest and greatest.
>
> On the other hand, what would happen if step #2 fails, so we go with 3B
> then? For instance, if issued command was fsfreeze-freeze, which we've
> written asynchronously, users can issue fsfreeze-status to query for status.
>
> Have I got it right?
Yes - if the user is going to issue arbitrary guest agent commands, and
we know the command won't reply on success, we should still wait a
reasonable amount of time for an error, but we should also return
control to the caller to allow them to detect the command's success via
other means such as an event occurring.
--
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: 620 bytes --]
prev parent reply other threads:[~2012-08-21 15:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <5021AD24.6080806@intellilink.co.jp>
2012-08-08 14:36 ` [Qemu-devel] [PATCH 0/5] support guest agent general command Eric Blake
2012-08-21 15:26 ` Michal Privoznik
2012-08-21 15:55 ` Eric Blake [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=5033AF7B.40001@redhat.com \
--to=eblake@redhat.com \
--cc=libvir-list@redhat.com \
--cc=matsudadik@intellilink.co.jp \
--cc=mprivozn@redhat.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).