From 6390d5ef8236028c8dc00c5514e7ceac60ffd627 Mon Sep 17 00:00:00 2001 From: Matt Riedemann Date: Mon, 12 Sep 2016 11:23:19 -0400 Subject: [PATCH] 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 --- lib/nova_plugins/hypervisor-libvirt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/nova_plugins/hypervisor-libvirt b/lib/nova_plugins/hypervisor-libvirt index 20dde8ecc5..b4eb3c12a2 100644 --- a/lib/nova_plugins/hypervisor-libvirt +++ b/lib/nova_plugins/hypervisor-libvirt @@ -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