From 6c8e2871560a6e684a8d2b839607391a5ec51181 Mon Sep 17 00:00:00 2001 From: Lee Yarwood Date: Wed, 19 Aug 2020 15:48:57 +0100 Subject: [PATCH] libvirt: Remove MIN_{LIBVIRT,QEMU}_NATIVE_TLS_VERSION I8e349849db0b1a540d295c903f1470917b82fd97 has bumped MIN_{LIBVIRT,QEMU}_VERSION past this so remove the constant and associated logic. Change-Id: I83f9198c6ddfd8c9ac007dafdc085ce862ed0ec2 --- nova/tests/unit/virt/libvirt/test_driver.py | 3 +-- nova/virt/libvirt/driver.py | 10 +--------- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/nova/tests/unit/virt/libvirt/test_driver.py b/nova/tests/unit/virt/libvirt/test_driver.py index e168b36980..b823051bca 100644 --- a/nova/tests/unit/virt/libvirt/test_driver.py +++ b/nova/tests/unit/virt/libvirt/test_driver.py @@ -1814,8 +1814,7 @@ class LibvirtConnTestCase(test.NoDBTestCase, libvirt_driver.libvirt.VIR_MIGRATE_NON_SHARED_INC | libvirt_driver.libvirt.VIR_MIGRATE_TUNNELLED)) - @mock.patch.object(host.Host, 'has_min_version', return_value=True) - def test_live_migration_with_native_tls(self, host): + def test_live_migration_with_native_tls(self): self.flags(live_migration_with_native_tls=True, group='libvirt') self._do_test_parse_migration_flags( lm_expected=(libvirt_driver.libvirt.VIR_MIGRATE_LIVE | diff --git a/nova/virt/libvirt/driver.py b/nova/virt/libvirt/driver.py index e00dd77609..4e274eb2fa 100644 --- a/nova/virt/libvirt/driver.py +++ b/nova/virt/libvirt/driver.py @@ -250,9 +250,6 @@ VGPU_RESOURCE_SEMAPHORE = 'vgpu_resources' LIBVIRT_PERF_EVENT_PREFIX = 'VIR_PERF_PARAM_' -MIN_LIBVIRT_NATIVE_TLS_VERSION = (4, 4, 0) -MIN_QEMU_NATIVE_TLS_VERSION = (2, 11, 0) - # If the host has this libvirt version, then we skip the retry loop of # instance destroy() call, as libvirt itself increased the wait time # before the SIGKILL signal takes effect. @@ -1016,13 +1013,8 @@ class LibvirtDriver(driver.ComputeDriver): migration_flags |= libvirt.VIR_MIGRATE_TUNNELLED return migration_flags - def _is_native_tls_available(self): - return self._host.has_min_version(MIN_LIBVIRT_NATIVE_TLS_VERSION, - MIN_QEMU_NATIVE_TLS_VERSION) - def _handle_native_tls(self, migration_flags): - if (CONF.libvirt.live_migration_with_native_tls and - self._is_native_tls_available()): + if (CONF.libvirt.live_migration_with_native_tls): migration_flags |= libvirt.VIR_MIGRATE_TLS return migration_flags