Reviewed: https://review.opendev.org/751642 Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=66c7f00e1d9d7c0eebe46eb4b24b2b21f7413789 Submitter: Zuul Branch: master
commit 66c7f00e1d9d7c0eebe46eb4b24b2b21f7413789 Author: Dat Le <[email protected]> Date: Fri Sep 11 14:51:59 2020 +0700 Fix unplugging VIF when migrate/resize VM When migrating/resizing VM to destination host that has VIF type difference from source VIF type, it fails due to exception in unplugging VIF on source host after user perform a confirmation action. This change unplugs the vifs in resize_instance and wraps the call to unplug in confirm with an try except block. the call to unplug_vifs in confirm is not removed to support rolling upgrades but a todo is added to remove it after the Wallaby release. Change-Id: I2c195df5fcf844c0587933b5b5995bdca1a3ebed Closes-Bug: #1895220 ** 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/1895220 Title: Fail to cold migrate between two hosts have difference VIF type Status in OpenStack Compute (nova): Fix Released Bug description: Description =========== When migrating/resizing/rebuilding VM to destination host that has VIF type difference from source VIF type, it goes fail due to exception in unplugging VIF on source host after user perform a confirmation action. Steps to reproduce ================== * Network infrastructure use both openvswitch and vrouter * Booting VM on host use ovs plugin * Migrate/resize/rebuild VM to host use vrouter plugin Expected result =============== Unplug VIF sucessfully and finish cold migrate/resize/rebuild processing Actual result ============= Exception in unplugging VIF when VM is migrated/resized/rebuilt to host has binding port use vrouter type Environment =========== 1. Openstack version: Rocky 2. Hypervisor: Libvirt + KVM 3. Networking: Neutron with OpenVSwitch + OpenContrail Logs & Configs ============== * Nova compute log on source host: 2020-08-25 15:10:23.529 6 ERROR nova.compute.manager [req-d6f9c6fc-a849-4986-90ac-12348ab64732 fc6ec8f82e6e4228b205512db297b7f1 a7b424aeccd641d49901cc9d5a6d170d - default default] [instance: de883f9c-a5e4-4c58-ba32-ff3d92acfd1c] Confirm resize failed on source host server236. Resource allocations in the placement service will be removed regardless because the instance is now on the destination host Compute209. You can try hard rebooting the instance to correct its state.: InternalError: Failure running os_vif plugin unplug method: No VIF plugin was found with the name vrouter 2020-08-25 15:10:23.529 6 ERROR nova.compute.manager [instance: de883f9c-a5e4-4c58-ba32-ff3d92acfd1c] Traceback (most recent call last): 2020-08-25 15:10:23.529 6 ERROR nova.compute.manager [instance: de883f9c-a5e4-4c58-ba32-ff3d92acfd1c] File "/var/lib/kolla/venv/lib/python2.7/site-packages/nova/compute/manager.py", line 4053, in do_confirm_resize 2020-08-25 15:10:23.529 6 ERROR nova.compute.manager [instance: de883f9c-a5e4-4c58-ba32-ff3d92acfd1c] context, instance, migration=migration) 2020-08-25 15:10:23.529 6 ERROR nova.compute.manager [instance: de883f9c-a5e4-4c58-ba32-ff3d92acfd1c] File "/var/lib/kolla/venv/lib/python2.7/site-packages/nova/compute/manager.py", line 4141, in _confirm_resize 2020-08-25 15:10:23.529 6 ERROR nova.compute.manager [instance: de883f9c-a5e4-4c58-ba32-ff3d92acfd1c] network_info) 2020-08-25 15:10:23.529 6 ERROR nova.compute.manager [instance: de883f9c-a5e4-4c58-ba32-ff3d92acfd1c] File "/var/lib/kolla/venv/lib/python2.7/site-packages/nova/virt/libvirt/driver.py", line 8571, in confirm_migration 2020-08-25 15:10:23.529 6 ERROR nova.compute.manager [instance: de883f9c-a5e4-4c58-ba32-ff3d92acfd1c] self._cleanup_resize(context, instance, network_info) 2020-08-25 15:10:23.529 6 ERROR nova.compute.manager [instance: de883f9c-a5e4-4c58-ba32-ff3d92acfd1c] File "/var/lib/kolla/venv/lib/python2.7/site-packages/nova/virt/libvirt/driver.py", line 1252, in _cleanup_resize 2020-08-25 15:10:23.529 6 ERROR nova.compute.manager [instance: de883f9c-a5e4-4c58-ba32-ff3d92acfd1c] self.unplug_vifs(instance, network_info) 2020-08-25 15:10:23.529 6 ERROR nova.compute.manager [instance: de883f9c-a5e4-4c58-ba32-ff3d92acfd1c] File "/var/lib/kolla/venv/lib/python2.7/site-packages/nova/virt/libvirt/driver.py", line 846, in unplug_vifs 2020-08-25 15:10:23.529 6 ERROR nova.compute.manager [instance: de883f9c-a5e4-4c58-ba32-ff3d92acfd1c] self._unplug_vifs(instance, network_info, False) 2020-08-25 15:10:23.529 6 ERROR nova.compute.manager [instance: de883f9c-a5e4-4c58-ba32-ff3d92acfd1c] File "/var/lib/kolla/venv/lib/python2.7/site-packages/nova/virt/libvirt/driver.py", line 840, in _unplug_vifs 2020-08-25 15:10:23.529 6 ERROR nova.compute.manager [instance: de883f9c-a5e4-4c58-ba32-ff3d92acfd1c] self.vif_driver.unplug(instance, vif) 2020-08-25 15:10:23.529 6 ERROR nova.compute.manager [instance: de883f9c-a5e4-4c58-ba32-ff3d92acfd1c] File "/var/lib/kolla/venv/lib/python2.7/site-packages/nova/virt/libvirt/vif.py", line 937, in unplug 2020-08-25 15:10:23.529 6 ERROR nova.compute.manager [instance: de883f9c-a5e4-4c58-ba32-ff3d92acfd1c] self._unplug_os_vif(instance, vif_obj) 2020-08-25 15:10:23.529 6 ERROR nova.compute.manager [instance: de883f9c-a5e4-4c58-ba32-ff3d92acfd1c] File "/var/lib/kolla/venv/lib/python2.7/site-packages/nova/virt/libvirt/vif.py", line 917, in _unplug_os_vif 2020-08-25 15:10:23.529 6 ERROR nova.compute.manager [instance: de883f9c-a5e4-4c58-ba32-ff3d92acfd1c] raise exception.InternalError(msg) 2020-08-25 15:10:23.529 6 ERROR nova.compute.manager [instance: de883f9c-a5e4-4c58-ba32-ff3d92acfd1c] InternalError: Failure running os_vif plugin unplug method: No VIF plugin was found with the name vrouter To manage notifications about this bug go to: https://bugs.launchpad.net/nova/+bug/1895220/+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

