summaryrefslogtreecommitdiff
path: root/nova/conf
diff options
context:
space:
mode:
authorKashyap Chamarthy <kchamart@redhat.com>2023-01-17 11:15:37 +0100
committerKashyap Chamarthy <kchamart@redhat.com>2023-01-24 11:26:56 +0100
commit9caaaf1f221063a4329c72c8b67a6015648644a2 (patch)
tree13196b8d2dc003732ac918c67d74b439a4f9cad2 /nova/conf
parentba9d4c909beff4e9ab86911a35dd5db8d8ce08d6 (diff)
downloadnova-9caaaf1f221063a4329c72c8b67a6015648644a2.tar.gz
libvirt: At start-up rework compareCPU() usage with a workaround
In this patch: - Remove the first compareCPU() call (called via the wrapper _compare_cpu()) in _check_cpu_compatibility(), and let libvirt handle it. (QEMU >=2.9 and libvirt >= 4.4.0 are the mininum required versions, and upstream Nova satisfies them by a good margin.) - Validate the user-configured CPU models from _get_cpu_model_mapping(). And take into account all the CPU flags before calling _compare_cpu(). (Suggested-by: Sean Mooney -- thanks!) - Add a workaround to allow skipping the remaining compareCPU() call in _check_cpu_compatibility() as a potential future-proof (because we cannot test all possible CPU models and hardware). Unlike the removed first call, this call takes into account the extra CPU flags provided by the user into account when evaluating guest CPU model compatibility. As a follow up comes the patch[1] that replaces the older libvirt CPU API with the newer one. [1] https://review.opendev.org/c/openstack/nova/+/869950 -- libvirt: Replace usage of compareCPU() with compareHypervisorCPU() Change-Id: I8ef9db851b37c5249d2efbe09a15a1ddbae8205d Signed-off-by: Kashyap Chamarthy <kchamart@redhat.com>
Diffstat (limited to 'nova/conf')
-rw-r--r--nova/conf/workarounds.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/nova/conf/workarounds.py b/nova/conf/workarounds.py
index 1116664d36..e485ae673a 100644
--- a/nova/conf/workarounds.py
+++ b/nova/conf/workarounds.py
@@ -410,6 +410,13 @@ with the destination host. When using QEMU >= 2.9 and libvirt >=
4.4.0, libvirt will do the correct thing with respect to checking CPU
compatibility on the destination host during live migration.
"""),
+ cfg.BoolOpt('skip_cpu_compare_at_startup',
+ default=False,
+ help="""
+This will skip the CPU comparison call at the startup of Compute
+service and lets libvirt handle it.
+"""),
+
cfg.BoolOpt(
'skip_hypervisor_version_check_on_lm',
default=False,