Browse code

Install libguestfs for nova-compute on Ubuntu

We were already installing this for n-cpu on rpm distros, but not
Ubuntu. Install it so that nova-compute can use it for file injection,
which is the preferred method over nbd.

Set CONF.libvirt.inject_partition to -1. This enables using libguestfs to
determine the proper partition to inject into.

Don't bother trying to load the nbd kernel module anymore. It won't be used
since we know always expect libguestfs to be installed.

Change-Id: Ifa9d95bf759f1dad8685590a2df242d852dd2cb0

Russell Bryant authored on 2014/01/31 07:49:22
Showing 2 changed files
... ...
@@ -1,8 +1,8 @@
1 1
 # Stuff for diablo volumes
2
-nbd-client
3 2
 lvm2
4 3
 open-iscsi
5 4
 open-iscsi-utils # Deprecated since quantal dist:precise
6 5
 genisoimage
7 6
 sysfsutils
8 7
 sg3-utils
8
+python-guestfs
... ...
@@ -240,8 +240,10 @@ function configure_nova() {
240 240
         sudo sysctl -w net.ipv4.ip_forward=1
241 241
 
242 242
         if [[ "$VIRT_DRIVER" = 'libvirt' ]]; then
243
-            # Attempt to load modules: network block device - used to manage qcow images
244
-            sudo modprobe nbd || true
243
+            # When libguestfs is available for file injection, enable using
244
+            # libguestfs to inspect the image and figure out the proper
245
+            # partition to inject into.
246
+            iniset $NOVA_CONF libvirt inject_partition '-1'
245 247
 
246 248
             # Check for kvm (hardware based virtualization).  If unable to initialize
247 249
             # kvm, we drop back to the slower emulation mode (qemu).  Note: many systems