From 3ca91b2186bb710357eda49e81694d07d8fe792b Mon Sep 17 00:00:00 2001 From: Ian Wienand Date: Fri, 16 May 2014 14:00:01 +1000 Subject: [PATCH] Workaround Fedora libvirtd issues on Xen instances Fedora libvirtd fails to start on Xen instances (i.e. rackspace instances) due to [1]. This works around the issue until it can be fixed upstream. [1] https://bugzilla.redhat.com/show_bug.cgi?id=1098376 Change-Id: I3790b5025982730263a6a84fce596e80f09efd5a --- lib/nova_plugins/functions-libvirt | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/lib/nova_plugins/functions-libvirt b/lib/nova_plugins/functions-libvirt index 1f2b23992e..f435456e7f 100644 --- a/lib/nova_plugins/functions-libvirt +++ b/lib/nova_plugins/functions-libvirt @@ -28,6 +28,23 @@ function install_libvirt { install_package libvirt-python install_package python-libguestfs fi + + # workaround for + # https://bugzilla.redhat.com/show_bug.cgi?id=1098376; if we see + # the empty Xen proc file then remove the xen/libxl plugin + # shared-libraries (yum remove would uninstall libvirt due to + # dependencies, so let's avoid that...) + if is_fedora && [ -f /proc/xen/capabilities ] && \ + [ $(stat -c '%s' /proc/xen/capabilities) -eq 0 ]; then + sudo rm -f /usr/lib64/libvirt/connection-driver/libvirt_driver_libxl.so + sudo rm -f /usr/lib64/libvirt/connection-driver/libvirt_driver_xen.so + + # another bug requires these to be restarted to avoid + # potential hang of libvirtd + # https://bugzilla.redhat.com/show_bug.cgi?id=1098866 + sudo service dbus restart + sudo service firewalld restart + fi } # Configures the installed libvirt system so that is accessible by