Reviewed: https://review.opendev.org/c/openstack/nova/+/804230 Committed: https://opendev.org/openstack/nova/commit/962eda94d52321c3237da870c3d0455c6f0e851b Submitter: "Zuul (22348)" Branch: master
commit 962eda94d52321c3237da870c3d0455c6f0e851b Author: Lee Yarwood <[email protected]> Date: Wed Aug 11 12:04:11 2021 +0100 compute: Ensure updates to bdms during pre_live_migration are saved When connecting volumes to the underlying host the virt drivers can attempt to stash additional metadata returned from os-brick into the connection_info associated with a bdm. This pretty janky behaviour relies on someone later calling .save() against the underlying BlockDeviceMapping object to persist these changes into the database as happens in the driver block device layer during a standard volume attach. However during pre_live_migration no call was made to .save() resulting in the changes made to the connection_info being lost. This change simply introduces this call at the end of the pre_live_migration method on the destination via the driver bdm objects we provide in block_device_info. Closes-Bug: #1939545 Change-Id: Iea8896682fc28e3a5cd25afa45238272bee745e1 ** Changed in: nova Status: In Progress => Fix Released -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to OpenStack Compute (nova). https://bugs.launchpad.net/bugs/1939545 Title: device_path not saved into bdm.connection_info during pre_live_migration Status in OpenStack Compute (nova): Fix Released Bug description: Description =========== Various block based volume drivers attempt to save a device_path back into the stashed connection_info stored within Nova's block device mappings *after* connecting a volume to the underlying host. Thanks to the indirection caused by the various data structures used between the virt and compute layers this isn't actually saved into the underlying block device mapping database record during a typical attach flow until we get back into the compute and driver block device layer: https://github.com/openstack/nova/blob/84b61790763f91e12eebb96d955e2f83abc00d56/nova/virt/block_device.py#L613-L619 However when an instance is being live migrated these volumes are connected as part of pre_live_migration on the destination and no attempt is made to save the updates made to the connection_info of the volume into the database. This isn't a massive problem as os-brick can for the most part lookup the device during future operations but it is obviously inefficient. This was initially hit in bug #1936439 but that bug is now being used to track in a trivial DEBUG log change while this bug will track in the underlying fix for the above issue. Steps to reproduce ================== * Attach an iSCSI/FC/NVME etc volume to an instance * Live migrate the instance * Confirm that device_path isn't present in the connection_info stashed in the bdm Expected result =============== device_path is stashed in the connection_info of the bdm Actual result ============= device_path isn't stashed in the connection_info of the bdm Environment =========== 1. Exact version of OpenStack you are running. See the following list for all releases: http://docs.openstack.org/releases/ master 2. Which hypervisor did you use? (For example: Libvirt + KVM, Libvirt + XEN, Hyper-V, PowerKVM, ...) What's the version of that? libvirt 2. Which storage type did you use? (For example: Ceph, LVM, GPFS, ...) What's the version of that? LVM/iSCSI/FC/NVMe, any block based volume backends. 3. Which networking type did you use? (For example: nova-network, Neutron with OpenVSwitch, ...) N/A Logs & Configs ============== See bug #1936439 To manage notifications about this bug go to: https://bugs.launchpad.net/nova/+bug/1939545/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : [email protected] Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp

