From 169f5dee475f49ca18cd5f803287797a6c1ee5c0 Mon Sep 17 00:00:00 2001 From: Lee Yarwood Date: Mon, 6 Jan 2020 13:45:33 +0000 Subject: [PATCH] libvirt: Support the use of the virt-preview repo when using Fedora The virt-preview repo provides the latest rawhide versions of QEMU, Libvirt and other virt tools for older releases of Fedora. This repo is extremely useful when testing features in OpenStack that rely on these latest builds well in advance of them landing in full Fedora, CentOS or RHEL releases. This change adds a ``ENABLE_FEDORA_VIRT_PREVIEW_REPO`` configurable to control when this repo is enabled and used when deploying on Fedora. Change-Id: I5c3e1b7b632fd73310c462530990cdb0e0c0ceea --- lib/nova_plugins/functions-libvirt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/nova_plugins/functions-libvirt b/lib/nova_plugins/functions-libvirt index 35666393ca..03df258e03 100644 --- a/lib/nova_plugins/functions-libvirt +++ b/lib/nova_plugins/functions-libvirt @@ -24,6 +24,10 @@ DEBUG_LIBVIRT=$(trueorfalse True DEBUG_LIBVIRT) # Currently fairly specific to OpenStackCI hosts DEBUG_LIBVIRT_COREDUMPS=$(trueorfalse False DEBUG_LIBVIRT_COREDUMPS) +# Enable the Fedora Virtualization Preview Copr repo that provides the latest +# rawhide builds of QEMU, Libvirt and other virt tools. +ENABLE_FEDORA_VIRT_PREVIEW_REPO=$(trueorfalse False ENABLE_FEDORA_VIRT_PREVIEW_REPO) + # Enable coredumps for libvirt # Bug: https://bugs.launchpad.net/nova/+bug/1643911 function _enable_coredump { @@ -61,6 +65,12 @@ function install_libvirt { #pip_install_gr elif is_fedora || is_suse; then + # Optionally enable the virt-preview repo when on Fedora + if [[ $DISTRO =~ f[0-9][0-9] ]] && [[ ${ENABLE_FEDORA_VIRT_PREVIEW_REPO} == "True" ]]; then + # https://copr.fedorainfracloud.org/coprs/g/virtmaint-sig/virt-preview/ + sudo dnf copr enable -y @virtmaint-sig/virt-preview + fi + # Note that in CentOS/RHEL this needs to come from the RDO # repositories (qemu-kvm-ev ... which provides this package) # as the base system version is too old. We should have