diff --git a/nova/tests/functional/libvirt/test_numa_servers.py b/nova/tests/functional/libvirt/test_numa_servers.py index e94a279a29b0..9f4a834ab1c8 100644 --- a/nova/tests/functional/libvirt/test_numa_servers.py +++ b/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 diff --git a/nova/tests/functional/libvirt/test_pci_sriov_servers.py b/nova/tests/functional/libvirt/test_pci_sriov_servers.py index 6bf8c2377e49..c21f47f45c10 100644 --- a/nova/tests/functional/libvirt/test_pci_sriov_servers.py +++ b/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) diff --git a/nova/tests/functional/libvirt/test_rt_servers.py b/nova/tests/functional/libvirt/test_rt_servers.py index 6337c3b86058..127f4bd2a9b1 100644 --- a/nova/tests/functional/libvirt/test_rt_servers.py +++ b/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', diff --git a/nova/tests/unit/virt/libvirt/fakelibvirt.py b/nova/tests/unit/virt/libvirt/fakelibvirt.py index 1cca0f618444..fea9764a89d3 100644 --- a/nova/tests/unit/virt/libvirt/fakelibvirt.py +++ b/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' diff --git a/nova/tests/unit/virt/libvirt/test_driver.py b/nova/tests/unit/virt/libvirt/test_driver.py index 17cb95a4ae9c..c6a125d1b239 100644 --- a/nova/tests/unit/virt/libvirt/test_driver.py +++ b/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) diff --git a/nova/virt/libvirt/driver.py b/nova/virt/libvirt/driver.py index d1660db29b9a..9b8c7b674a82 100644 --- a/nova/virt/libvirt/driver.py +++ b/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 diff --git a/releasenotes/notes/pike-libvirt-min-version-bb7f43020995ac10.yaml b/releasenotes/notes/pike-libvirt-min-version-bb7f43020995ac10.yaml new file mode 100644 index 000000000000..74abe705c168 --- /dev/null +++ b/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.