Browse code

libvirt: install python-guestfs when ENABLE_FILE_INJECTION=True

There is a bit of a weird history here, but the net is we're not
installing python-guestfs when ENABLE_FILE_INJECTION is set, which
it is in the gate-tempest-dsvm-neutron-full-ssh job, which makes
file injection (personality) tests fail.

The history:

Commit 0ae942b41c6dcd0fe7353e7d68574194fb72a66d moved installing
python-guestfs to the hypervisor-libvirt file and it was conditional
on a flag to enable file injection and the backing distro.

Commit a3c94468baa159840a47c34cf94d97d816208313 removed the ability
to configure nova for file injection, which never made any Tempest
tests fail because we didn't have a job that tested file injection
with ssh, which is what gate-tempest-dsvm-neutron-full-ssh does.

Commit 6d3670a65280d71529f8aad8ca5a0422abffebd0 added the ability
back to enable file injection and the gate-tempest-dsvm-neutron-full-ssh
job uses it, but missed added the condition back in from 0ae942b41
which installed the python-guestfs package. This change adds that
back in.

Change-Id: I1c1ef093b70007100646c086dc5724cd64751d00
Closes-Bug: #1622649

Matt Riedemann authored on 2016/09/13 00:23:19
Showing 1 changed files
... ...
@@ -100,6 +100,14 @@ function install_nova_hypervisor {
100 100
             yum_install libcgroup-tools
101 101
         fi
102 102
     fi
103
+
104
+    if [[ "$ENABLE_FILE_INJECTION" == "True" ]] ; then
105
+        if is_ubuntu; then
106
+            install_package python-guestfs
107
+        elif is_fedora || is_suse; then
108
+            install_package python-libguestfs
109
+        fi
110
+    fi
103 111
 }
104 112
 
105 113
 # start_nova_hypervisor - Start any required external services