Browse Source

Bump minimum required libvirt/qemu versions for Pike

Based on the libvirt distro support matrix wiki [1] this change
bumps the minimum required version of libvirt to 1.2.9 and
QEMU to 2.1.0. These were both advertised as the next minimums
since Newton, we just never made the change in Ocata.

The next minimum libvirt version is set to 1.3.1 and the next
minimum QEMU version is set to 2.5.0, which is what we gate
on with Ubuntu 16.04 but also falls within the distro support
matrix for a representative set of other supported distros.

[1] https://wiki.openstack.org/wiki/LibvirtDistroSupportMatrix

Change-Id: I9a972e3fde2e4e552f6fc98350820c07873c3de3
changes/00/432700/2
Matt Riedemann 6 years ago
parent
commit
b980df0d54
  1. 2
      nova/tests/functional/libvirt/test_numa_servers.py
  2. 2
      nova/tests/functional/libvirt/test_pci_sriov_servers.py
  3. 2
      nova/tests/functional/libvirt/test_rt_servers.py
  4. 4
      nova/tests/unit/virt/libvirt/fakelibvirt.py
  5. 14
      nova/tests/unit/virt/libvirt/test_driver.py
  6. 8
      nova/virt/libvirt/driver.py
  7. 8
      releasenotes/notes/pike-libvirt-min-version-bb7f43020995ac10.yaml

2
nova/tests/functional/libvirt/test_numa_servers.py

@ -102,7 +102,7 @@ class NUMAServersTest(ServersTestBase):
def _get_connection(self, host_info):
fake_connection = fakelibvirt.Connection('qemu:///system',
version=1002007,
version=1002009,
hv_version=2001000,
host_info=host_info)
return fake_connection

2
nova/tests/functional/libvirt/test_pci_sriov_servers.py

@ -85,7 +85,7 @@ class SRIOVServersTest(ServersTestBase):
def _get_connection(self, host_info, pci_info):
fake_connection = fakelibvirt.Connection('qemu:///system',
version=1002007,
version=1002009,
hv_version=2001000,
host_info=host_info,
pci_info=pci_info)

2
nova/tests/functional/libvirt/test_rt_servers.py

@ -73,7 +73,7 @@ class RealTimeServersTest(ServersTestBase):
cpu_cores=2, cpu_threads=2,
kB_mem=15740000)
fake_connection = fakelibvirt.Connection('qemu:///system',
version=1002007,
version=1002009,
hv_version=2001000,
host_info=host_info)
with mock.patch('nova.virt.libvirt.host.Host.get_connection',

4
nova/tests/unit/virt/libvirt/fakelibvirt.py

@ -155,9 +155,9 @@ VIR_SECRET_USAGE_TYPE_CEPH = 2
VIR_SECRET_USAGE_TYPE_ISCSI = 3
# Libvirt version to match MIN_LIBVIRT_VERSION in driver.py
FAKE_LIBVIRT_VERSION = 1002001
FAKE_LIBVIRT_VERSION = 1002009
# Libvirt version to match MIN_QEMU_VERSION in driver.py
FAKE_QEMU_VERSION = 1005003
FAKE_QEMU_VERSION = 2001000
PF_CAP_TYPE = 'virt_functions'
VF_CAP_TYPE = 'phys_function'

14
nova/tests/unit/virt/libvirt/test_driver.py

@ -2051,9 +2051,12 @@ class LibvirtConnTestCase(test.NoDBTestCase):
return_value=caps),
mock.patch.object(
hardware, 'get_vcpu_pin_set', return_value=set([3])),
mock.patch.object(random, 'choice')
mock.patch.object(random, 'choice'),
mock.patch.object(drvr, '_has_numa_support',
return_value=False)
) as (get_host_cap_mock,
get_vcpu_pin_set_mock, choice_mock):
get_vcpu_pin_set_mock, choice_mock,
_has_numa_support_mock):
cfg = drvr._get_guest_config(instance_ref, [],
image_meta, disk_info)
self.assertFalse(choice_mock.called)
@ -2225,9 +2228,12 @@ class LibvirtConnTestCase(test.NoDBTestCase):
hardware, 'get_vcpu_pin_set', return_value=set([3])),
mock.patch.object(random, 'choice'),
mock.patch.object(pci_manager, "get_instance_pci_devs",
return_value=[pci_device, pci_device2])
return_value=[pci_device, pci_device2]),
mock.patch.object(conn, '_has_numa_support',
return_value=False)
) as (get_host_cap_mock,
get_vcpu_pin_set_mock, choice_mock, pci_mock):
get_vcpu_pin_set_mock, choice_mock, pci_mock,
_has_numa_support_mock):
cfg = conn._get_guest_config(instance_ref, [],
image_meta, disk_info)
self.assertFalse(choice_mock.called)

8
nova/virt/libvirt/driver.py

@ -197,15 +197,15 @@ patch_tpool_proxy()
# versions. Over time, this will become a common min version
# for all architectures/hypervisors, as this value rises to
# meet them.
MIN_LIBVIRT_VERSION = (1, 2, 1)
MIN_QEMU_VERSION = (1, 5, 3)
MIN_LIBVIRT_VERSION = (1, 2, 9)
MIN_QEMU_VERSION = (2, 1, 0)
# TODO(berrange): Re-evaluate this at start of each release cycle
# to decide if we want to plan a future min version bump.
# MIN_LIBVIRT_VERSION can be updated to match this after
# NEXT_MIN_LIBVIRT_VERSION has been at a higher value for
# one cycle
NEXT_MIN_LIBVIRT_VERSION = (1, 2, 9)
NEXT_MIN_QEMU_VERSION = (2, 1, 0)
NEXT_MIN_LIBVIRT_VERSION = (1, 3, 1)
NEXT_MIN_QEMU_VERSION = (2, 5, 0)
# When the above version matches/exceeds this version
# delete it & corresponding code using it

8
releasenotes/notes/pike-libvirt-min-version-bb7f43020995ac10.yaml

@ -0,0 +1,8 @@
---
upgrade:
- |
The minimum required version of libvirt used by the `nova-compute` service
is now 1.2.9. The minimum required version of QEMU used by the
`nova-compute` service is now 2.1.0. Failing to meet these minimum versions
when using the libvirt compute driver will result in the `nova-compute`
service not starting.
Loading…
Cancel
Save