Description of problem:
In libguestfs 1.18 we added useful new APIs which expose FUSE,
so that programs don't need to use the external guestmount program
in order to make guest filesystem directories appear mounted
Currently OpenStack uses guestmount directly, but this is
problematic, see eg:
These kinds of problems could be solved easily if OpenStack
could use a more recent version of libguestfs which supported
the mount-local API. However because RHEL 6.3 libguestfs is
version 1.16, it doesn't have this API, effectively preventing
us from contributing such a patch upstream.
Therefore it would make sense for us either to rebase
libguestfs to 1.18, or to backport the 3 mount-local APIs
to libguestfs 1.16, for RHEL 6.4.
Note that Fedora >= 17 has libguestfs 1.18.
Note this should only be an issue when nova is _creating_ the authorized_keys file. A workaround would be to create an empty file with appropriate selinux labels in the guest image.
Also guestmount supports passing mount options when using a specific partition,
so if the guest image(s) have a simple layout, a specific partition to inject to can be configured, and in this mode nova could be modified to pass the appropriate options. It's not been tested whether SElinux labels can be updated in this way.
Bug 832511 would be helped by this.
have run some basic test for mount-local api with the following test script(https://github.com/libguestfs/libguestfs/blob/master/examples/mount_local.c), more detail test will be done later,
[root@station2 tmp]# ./mount_local disk.img
This is the 'mount-local' demonstration program. Follow the
instructions on screen.
Creating and formatting the disk image, please wait a moment ...
The _current directory_ is a FUSE filesystem backed by the disk
image which is managed by libguestfs. Any files or directories
you copy into here (up to 512 MB) will be saved into the disk
image. You can also delete files, create certain special files
and so on.
When you have finished adding files, hit ^D or exit to exit the
shell and return to the mount-local program.
mount-local-shell> touch mount_local.c
mount-local-shell> touch this_is_mount_local_test
[root@station2 tmp]# guestfish -a disk.img -m /dev/sda1
><fs> ls /
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.