[Libguestfs] Proposed changes for OpenStack

Richard W.M. Jones rjones at redhat.com
Wed Dec 14 10:36:20 UTC 2011


On Wed, Dec 14, 2011 at 09:33:35AM +0000, Matthew Booth wrote:
> On 12/14/2011 08:44 AM, Richard W.M. Jones wrote:
> >[These two patches are for discussion only]
> >
> >Allow FUSE support to be used directly through the API.
> >This is the second commit.
> >
> >In order to make this usable from guestfish, we have to
> >also bind the events API in guestfish.  This is the first
> >commit.
> 
> There's not really enough information here to evaluate the proposed
> changes. Can you give an example of what you're trying to do?

There's a very specific need for this in OpenStack.  We want to be
able to inject files and make other filesystem changes -- and there is
already common code which assumes the guest filesystem is mounted
somewhere.  But also we want to call libguestfs APIs such as
guestfs_tune2fs.  Currently we can do the mounting bit by calling
guestmount, and we can do the other libguestfs API calls, but we need
to launch libguestfs twice to do this.

Here is Padraig's current OpenStack patch:

https://review.openstack.org/#change,1993
https://review.openstack.org/#change,1994

> In general, though, this feels wrong for a couple of reasons.
> Firstly, a callback mechanism implemented with shell scripts is
> simply hideous. Imagine trying to use that from another language.

This is only for guestfish (which is a shell script tool).  How would
you want to capture events in guestfish?

> Secondly, mounting filesystems is not the business of the guestfs
> api, it's the business of FUSE. I have't actually checked the
> libfuse API, but this seems like a function which makes much more
> sense in that context.

See above.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine.  Supports Linux and Windows.
http://et.redhat.com/~rjones/virt-df/




More information about the Libguestfs mailing list