summaryrefslogtreecommitdiffstats
path: root/nova/rootwrap
diff options
context:
space:
mode:
authorPádraig Brady <pbrady@redhat.com>2011-11-30 17:00:17 +0000
committerPádraig Brady <P@draigBrady.com>2011-12-22 11:50:56 +0000
commitdd56fd39d558c4052c307e617325a8631016ec70 (patch)
treee868ce35a3b3d25f386628d875669504d645f6a0 /nova/rootwrap
parent5335b4ab0ef1f91203905764de6fcc7e53cb2934 (diff)
downloadnova-dd56fd39d558c4052c307e617325a8631016ec70.tar.gz
nova-dd56fd39d558c4052c307e617325a8631016ec70.tar.xz
nova-dd56fd39d558c4052c307e617325a8631016ec70.zip
Bug#898257 support handling images with libguestfs
http://libguestfs.org/ provides both utilities and libraries to manipulate image files containing various operating systems. It supports various image file formats and so will expand the formats and guest types supported by openstack. It does have extra overhead in that it starts a VM to access the image. This has both advantages and disadvantages. Also qemu-nbd is not supported on some systems like RHEL 6. * nova/virt/disk/api.py (img_handlers): Add guestfs to the default list of access methods to try, to act as a fallback. * nova/virt/disk/guestfs.py: A new plugin class to provide support for libguestfs mounting. Note we use the guestmount utility, as a non root user, so the user will need the ability to use fusermount, which is often provided by being a member of the 'fuser' group. In future we might use the guestfs python module to give greater granularity of control over the image. Change-Id: I2e22c9d149fff7a73cd8cebaa280d68d3fb9096c
Diffstat (limited to 'nova/rootwrap')
-rwxr-xr-xnova/rootwrap/compute.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/nova/rootwrap/compute.py b/nova/rootwrap/compute.py
index cd971e0d1..cee4cca2c 100755
--- a/nova/rootwrap/compute.py
+++ b/nova/rootwrap/compute.py
@@ -44,6 +44,14 @@ filters = [
# nova/virt/disk/loop.py: 'losetup', '--detach', device
CommandFilter("/sbin/losetup", "root"),
+ # nova/virt/disk/guestfs.py: 'guestmount', '--rw', '-a', image, '-i'
+ # nova/virt/disk/guestfs.py: 'guestmount', '--rw', '-a', image, '-m' dev
+ Commandfilter("/usr/bin/guestmount", "root"),
+
+ # nova/virt/disk/guestfs.py: 'fusermount', 'u', mount_dir
+ Commandfilter("/bin/fusermount", "root"),
+ Commandfilter("/usr/bin/fusermount", "root"),
+
# nova/virt/disk/api.py: 'tee', metadata_path
# nova/virt/disk/api.py: 'tee', '-a', keyfile
# nova/virt/disk/api.py: 'tee', netfile