qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Michael Roth <mdroth@linux.vnet.ibm.com>
To: Adam Litke <agl@us.ibm.com>
Cc: Gal Hammer <ghammer@redhat.com>,
	Barak Azulay <bazulay@redhat.com>,
	arch@ovirt.org, qemu-devel@nongnu.org,
	vdsm-devel@lists.fedorahosted.org
Subject: Re: [Qemu-devel] converging  around a single guest agent
Date: Wed, 16 Nov 2011 20:09:46 -0600	[thread overview]
Message-ID: <4EC46CEA.4030009@linux.vnet.ibm.com> (raw)
In-Reply-To: <20111116202451.GI2726@us.ibm.com>

On 11/16/2011 02:24 PM, Adam Litke wrote:
> I have been following this thread pretty closely and the one sentence summary of
> the current argument is: ovirt-guest-agent is already featureful and tested, so
> let's drop qemu-ga and have everyone adopt ovirt-guest-agent.  Unfortunately,
> this track strays completely away from the stated goal of convergence.  I have
> at least two examples of why the greater KVM community can never adopt
> ovirt-guest-agent as-is.  To address this, I would like to counter with an
> example on how qemu-ga can enable the deployment of ovirt-guest-agent features
> and satisfy the needs of the whole community at the same time.
>
> 1) Scope:  The ovirt-guest-agent contains functionality that is incredibly
> useful within the context of oVirt.  Single Sign-on is very handy but KVM users
> outside the scope of oVirt will not want this extra complexity in their agent.
> For simplicity they will probably just write something small that does what they
> need (and we have failed to provide a ubiquitous KVM agent).
>
> 1) Deployment complexity: The more complex the guest agent is, the more often it
> will need to be updated (bug/security fixes, distro compatibility, new
> features).  Rolling out guest agent updates does not scale well in large
> environments (especially when the guest and host administrators are not the same
> person).
>
> For these reasons (and many others), I support having an agent with very basic
> primitives that can be orchestrated by the host to provide needed functionality.
> This agent would present a low-level, stable, extensible API that everyone can
> use.  Today qemu-ga supports the following verbs: sync ping info shutdown
> file-open file-close file-read file-write file-seek file-flush fsfreeze-status
> fsfreeze-freeze fsfreeze-thaw.  If we add a generic execute mechanism, then the
> agent can provide everything needed by oVirt to deploy SSO.
>
> Let's assume that we have already agreed on some sort of security policy for the
> write-file and exec primitives.  Consensus is possible on this issue but I
> don't want to get bogged down with that here.
>
> With the above primitives, SSO could be deployed automatically to a guest with
> the following sequence of commands:
>
> file-open "<exec-dir>/sso-package.bin" "w"
> file-write<fh>  <buf>
> file-close<fh>
> file-open "<exec-dir>/sso-package.bin" "x"
> file-exec<fh>  <args>
> file-close<fh>
>
> At this point, the package is installed.  It can contain whatever existing logic
> exists in the ovirt-guest-agent today.  To perform a user login, we'll assume
> that sso-package.bin contains an executable 'sso/do-user-sso':
>
> file-open "<exec-dir>/sso/do-user-sso" "x"
> exec<fh>  <args>
> file-close<fh>
>
> At this point the user would be logged in as before.
>
> Obviously, this type of approach could be made easier by providing a well
> designed exec API that returns command exit codes and (optionally) command
> output.  We could also formalize the install of additional components into some
> sort of plugin interface.  These are all relatively easy problems to solve.
>
> If we go in this direction, we would have a simple, general-purpose agent with
> low-level primitives that everyone can use.  We would also be able to easily
> extend the agent based on the needs of individual deployments (not the least of
> which is an oVirt environment).  If certain plugins become popular enough, they
> can always be promoted to first-order API calls in future versions of the API.
>
> What are your thoughts on this approach?
>

Another possibility, for functionality that may be more suited for a 
daemon that needs to maintain a lot of state, would be modifying the 
ovirt-guest-agent code to read/write to a (guest-local) named pipe. We 
can could then deploy the daemon via file-write+exec (assuming we 
provide a fork/detach flag), and the management tool could do 
request/response via file-write/file-read.

It's almost equivalent to reading/writing directly to a virtio-serial 
channel, except there'd need to be a translation 
(base64decode(qmp_json_response.payload)->oga_json_response, and 
vice-versa) at the ovirt management layer.

And we still reduce the deployment complexity since we can 
deploy/upgrade via a hypervisor push.

There's actually so many ways this could be done with exec support...

What's being lost in both approaches are ovirt-guest-agent-provided 
events, however. We'd either need to subsume those into qemu-ga, or 
provide a proxying mechanism on the guest-side for event reporting, 
which is something we've discussed in the past with the Spice folks with 
regard to support for session-level agents.

  reply	other threads:[~2011-11-17  2:10 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-15 17:24 [Qemu-devel] converging around a single guest agent Barak Azulay
2011-11-15 17:33 ` Alon Levy
2011-11-16 13:08   ` Gal Hammer
2011-11-15 18:01 ` Perry Myers
2011-11-15 18:08   ` Subhendu Ghosh
2011-11-15 19:45     ` Perry Myers
2011-11-16  6:48       ` Barak Azulay
2011-11-15 19:08 ` Anthony Liguori
2011-11-15 22:39   ` Ayal Baron
2011-11-16  7:53     ` Hans de Goede
2011-11-16  8:16       ` Ayal Baron
2011-11-16 14:59         ` Michael Roth
2011-11-17 15:11           ` Alon Levy
2011-11-16 12:07       ` Alon Levy
2011-11-16 13:45         ` Dor Laor
2011-11-16 13:47         ` Anthony Liguori
2011-11-16 17:55           ` Hans de Goede
2011-11-17 10:16             ` Alon Levy
2011-11-16 13:36     ` Anthony Liguori
2011-11-16 13:39       ` Dor Laor
2011-11-16 13:42         ` Anthony Liguori
2011-11-16 14:10           ` Ayal Baron
2011-11-16 14:20           ` Paolo Bonzini
2011-11-17  7:17             ` Itamar Heim
2011-11-17 14:31             ` Jamie Lokier
2011-11-16 13:45     ` Anthony Liguori
2011-11-15 19:09 ` Anthony Liguori
2011-11-15 23:01 ` Michael Roth
2011-11-16  0:42   ` Alexander Graf
2011-11-16  7:05     ` Barak Azulay
2011-11-16  8:16       ` Alexander Graf
2011-11-16 12:13         ` Barak Azulay
2011-11-16 15:28           ` Michael Roth
2011-11-16 17:53             ` Barak Azulay
2011-11-16 21:44               ` Michael Roth
2011-11-17  0:03               ` Anthony Liguori
2011-11-17  8:59                 ` Ayal Baron
2011-11-17 14:42                   ` Anthony Liguori
2011-11-16 10:18   ` Daniel P. Berrange
2011-11-16 20:24 ` Adam Litke
2011-11-17  2:09   ` Michael Roth [this message]
2011-11-17  8:46   ` Ayal Baron
2011-11-17 14:58     ` Michael Roth
2011-11-17 15:58     ` Adam Litke
2011-11-17 16:14       ` Daniel P. Berrange
2011-11-17 16:53         ` Eric Gaulin
2011-11-25 19:33         ` Barak Azulay
2011-11-17 17:09   ` Barak Azulay
2011-11-18  0:47     ` Luiz Capitulino
2011-11-17  0:48 ` [Qemu-devel] wiki summary Michael Roth
2011-11-17 16:34   ` Barak Azulay
2011-11-17 19:58     ` Michael Roth
2011-11-18 11:25       ` Barak Azulay
2011-11-18 14:10         ` Adam Litke
2011-11-18 14:21         ` Michael Roth
2011-11-24 12:40       ` Dor Laor
2011-11-24 16:47         ` Richard W.M. Jones
2011-11-25 10:07         ` Daniel P. Berrange
2011-11-27 12:19           ` Dor Laor

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=4EC46CEA.4030009@linux.vnet.ibm.com \
    --to=mdroth@linux.vnet.ibm.com \
    --cc=agl@us.ibm.com \
    --cc=arch@ovirt.org \
    --cc=bazulay@redhat.com \
    --cc=ghammer@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=vdsm-devel@lists.fedorahosted.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).