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 0ae942b41c 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 a3c94468ba 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 6d3670a652 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
This commit is contained in:
Matt Riedemann 2016-09-12 11:23:19 -04:00
parent 8a770cb050
commit 6390d5ef82

View File

@ -100,6 +100,14 @@ function install_nova_hypervisor {
yum_install libcgroup-tools
fi
fi
if [[ "$ENABLE_FILE_INJECTION" == "True" ]] ; then
if is_ubuntu; then
install_package python-guestfs
elif is_fedora || is_suse; then
install_package python-libguestfs
fi
fi
}
# start_nova_hypervisor - Start any required external services