nova/nova/conf
Kashyap Chamarthy 277f88e387 libvirt: Add a workaround to skip compareCPU() on destination
Nova's use of libvirt's compareCPU() API served its purpose
over the years, but its design limitations break live migration in
subtle ways.  For example, the compareCPU() API compares against the
host physical CPUID.  Some of the features from this CPUID aren not
exposed by KVM, and then there are some features that KVM emulates that
are not in the host CPUID.  The latter can cause bogus live migration
failures.

With QEMU >=2.9 and libvirt >= 4.4.0, libvirt will do the right thing in
terms of CPU compatibility checks on the destination host during live
migration.  Nova satisfies these minimum version requirements by a good
margin.  So, provide a workaround to skip the CPU comparison check on
the destination host before migrating a guest, and let libvirt handle it
correctly.  This workaround will be removed once Nova replaces the older
libvirt APIs with their newer and improved counterparts[1][2].

                - - -

Note that Nova's libvirt driver calls compareCPU() in another method,
_check_cpu_compatibility(); I did not remove its usage yet.  As it needs
more careful combing of the code, and then:

  - where possible, remove the usage of compareCPU() altogether, and
    rely on libvirt doing the right thing under the hood; or

  - where Nova _must_ do the CPU comparison checks, switch to the better
    libvirt CPU APIs -- baselineHypervisorCPU() and
    compareHypervisorCPU() -- that are described here[1].  This is work
    in progress[2].

[1] https://opendev.org/openstack/nova-specs/commit/70811da221035044e27
[2] https://review.opendev.org/q/topic:bp%252Fcpu-selection-with-hypervisor-consideration

Change-Id: I444991584118a969e9ea04d352821b07ec0ba88d
Closes-Bug: #1913716
Signed-off-by: Kashyap Chamarthy <kchamart@redhat.com>
Signed-off-by: Balazs Gibizer <bgibizer@redhat.com>
(cherry picked from commit 267a40663c)
2022-06-08 16:44:08 +00:00
..
__init__.py xenapi: Remove driver and tests 2020-09-11 14:09:06 +01:00
api.py nova-net: Remove final references to nova-network 2020-01-08 13:54:12 +00:00
availability_zone.py Default AZ for instance if cross_az_attach=False and checking from API 2019-10-31 10:08:46 -04:00
base.py Ensure config regexes match the entire string 2019-02-13 08:16:45 -05:00
cache.py conf: Make list->dict conversion more specific 2016-09-14 12:10:29 +00:00
cinder.py conf: Allow cinderclient and os_brick to independently log at DEBUG 2021-12-03 18:21:16 +00:00
compute.py Fix to implement 'pack' or 'spread' VM's NUMA cells 2022-02-08 10:46:28 +03:00
conductor.py conf: Remove '[conductor] topic' opt 2018-03-12 13:26:08 +00:00
configdrive.py conf: Rename 'configuration drive' to 'config drive' 2019-06-20 18:23:14 +01:00
console.py Fix indentation nits 2020-08-18 11:43:31 -05:00
consoleauth.py Remove nova-consoleauth 2019-07-05 15:04:47 +00:00
cyborg.py ksa auth conf and client for Cyborg access 2020-03-21 12:03:37 -07:00
database.py db: Exclude the 'use_db_reconnect' option 2021-08-09 15:34:40 +01:00
devices.py Expose the mdev class 2021-08-27 14:52:01 +01:00
ephemeral_storage.py Parse algorithm from cipher for ephemeral disk encryption 2017-04-26 11:19:43 -04:00
glance.py glance: Improve [glance]enable_rbd_download and associated options help text 2021-04-19 14:22:13 +01:00
guestfs.py conf: Resolve Sphinx errors 2018-07-02 14:00:12 +01:00
hyperv.py hacking: Resolve W605 (invalid escape sequence) 2019-06-24 14:24:06 -05:00
imagecache.py Explaining when a base image is considered unused to avoid confusion why some images aren't deleted. 2021-04-14 08:46:36 +02:00
ironic.py Merge "Remove [ironic]api_endpoint option" 2019-05-03 21:08:38 +00:00
key_manager.py Add secret=true to fixed_key configuration parameter 2018-12-03 14:39:51 -05:00
keystone.py Use ksa adapter for keystone conf & requests 2017-11-30 22:33:01 +00:00
libvirt.py Update live_migration_downtime definition 2022-02-23 13:21:03 -03:00
mks.py Use URIOpt 2017-07-18 00:38:24 +00:00
netconf.py Use the new type HostDomainOpt. 2021-05-19 10:29:56 +02:00
neutron.py Add config option for neutron client retries 2020-03-19 15:25:58 +00:00
notifications.py Change the default of notification_format to unversioned 2019-06-04 10:36:45 +02:00
novnc.py Allow TLS ciphers/protocols to be configurable for console proxies 2020-02-12 15:05:22 -06:00
opts.py conf: Make list->dict conversion more specific 2016-09-14 12:10:29 +00:00
paths.py Remove unused bindir config option 2020-10-30 04:33:13 +00:00
pci.py Introduce remote_managed tag for PCI devs 2022-02-09 01:23:24 +03:00
placement.py Delete the placement code 2019-04-28 20:06:15 +00:00
powervm.py Powervm configuration cleanup 2018-06-13 11:48:30 -05:00
quota.py Assert quota related API behavior when noop 2022-02-24 16:20:04 +00:00
rdp.py Use URIOpt 2017-07-18 00:38:24 +00:00
remote_debug.py config: Explicitly register 'remote_debug' CLI opts 2020-05-07 12:35:21 +00:00
rpc.py compute: Use long_rpc_timeout in reserve_block_device_name 2019-11-26 08:50:34 +00:00
scheduler.py conf: Remove deprecated aliases 2021-08-23 16:52:28 +01:00
serial_console.py hacking: Resolve W605 (invalid escape sequence) 2019-06-24 14:24:06 -05:00
service.py conf: Drop '[scheduler] periodic_task_interval' 2021-02-09 17:26:25 +00:00
service_token.py Service token is not experimental 2017-11-21 17:36:32 +00:00
servicegroup.py conf: Use new-style choice values 2018-09-12 09:45:06 -06:00
spice.py libvirt: Remove '[vnc] keymap', '[spice] keymap' options 2020-09-02 16:55:12 +01:00
upgrade_levels.py nova-net: Kill it 2020-01-14 21:25:56 +00:00
utils.py Get auth from context for glance endpoint 2017-11-21 10:26:42 -06:00
vendordata.py Use a service account to make vendordata requests. 2017-01-26 13:39:46 +00:00
vmware.py vmware: Remove vestigial nova-network support 2019-11-29 17:20:03 +00:00
vnc.py Remove deprecated opts from VNC conf 2022-01-13 19:22:29 +00:00
workarounds.py libvirt: Add a workaround to skip compareCPU() on destination 2022-06-08 16:44:08 +00:00
wsgi.py Add missing ws seperator between words 2018-11-26 23:42:18 +00:00
zvm.py z/VM Driver: Spawn and destroy function of z/VM driver 2018-07-16 11:35:11 +08:00