From 340ef02e0678af592992b2d14c26ad2abff6e115 Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Mon, 31 Aug 2020 14:12:40 +0100 Subject: [PATCH] libvirt: Deprecate support for non-QEMU/KVM backends None of these backends has had upstream testing in a very long time, if ever, and their usage levels are unknown. Deprecate them now so that we can at least remove the worst of them (UML, Xen) in the next cycle. Change-Id: Id5b15aa846a5ddaf4ac26fe586327aef8c08c89d Signed-off-by: Stephen Finucane --- nova/virt/libvirt/driver.py | 26 ++++++++++++------- ...ate-libvirt-backends-496446b8b8b225e9.yaml | 9 +++++++ 2 files changed, 26 insertions(+), 9 deletions(-) create mode 100644 releasenotes/notes/deprecate-libvirt-backends-496446b8b8b225e9.yaml diff --git a/nova/virt/libvirt/driver.py b/nova/virt/libvirt/driver.py index 0cd24aa7d0..2c8049ac05 100644 --- a/nova/virt/libvirt/driver.py +++ b/nova/virt/libvirt/driver.py @@ -601,17 +601,25 @@ class LibvirtDriver(driver.ComputeDriver): host arch configurations in order to indicate potential issues to administrators. """ + if CONF.libvirt.virt_type not in ('qemu', 'kvm'): + LOG.warning( + "Support for the '%(type)s' libvirt backend has been " + "deprecated and will be removed in a future release.", + {'type': CONF.libvirt.virt_type}, + ) + caps = self._host.get_capabilities() hostarch = caps.host.cpu.arch - if (CONF.libvirt.virt_type not in ('qemu', 'kvm') or - hostarch not in (fields.Architecture.I686, - fields.Architecture.X86_64)): - LOG.warning('The libvirt driver is not tested on ' - '%(type)s/%(arch)s by the OpenStack project and ' - 'thus its quality can not be ensured. For more ' - 'information, see: https://docs.openstack.org/' - 'nova/latest/user/support-matrix.html', - {'type': CONF.libvirt.virt_type, 'arch': hostarch}) + if hostarch not in ( + fields.Architecture.I686, fields.Architecture.X86_64, + ): + LOG.warning( + 'The libvirt driver is not tested on %(arch)s by the ' + 'OpenStack project and thus its quality can not be ensured. ' + 'For more information, see: https://docs.openstack.org/' + 'nova/latest/user/support-matrix.html', + {'arch': hostarch}, + ) if CONF.vnc.keymap: LOG.warning('The option "[vnc] keymap" has been deprecated ' diff --git a/releasenotes/notes/deprecate-libvirt-backends-496446b8b8b225e9.yaml b/releasenotes/notes/deprecate-libvirt-backends-496446b8b8b225e9.yaml new file mode 100644 index 0000000000..60156271c8 --- /dev/null +++ b/releasenotes/notes/deprecate-libvirt-backends-496446b8b8b225e9.yaml @@ -0,0 +1,9 @@ +--- +deprecations: + - | + Support for the ``xen``, ``uml``, ``lxc`` and ``parallels`` libvirt + backends, configured via the ``[libvirt] virt_type`` config option, has + been deprecated. None of these drivers have upstream testing and the + ``xen`` and ``uml`` backends specifically have never been considered + production ready. With this change, only the ``kvm`` and ``qemu`` backends + are considered supported when using the libvirt virt driver.