Reviewed: https://review.openstack.org/556332 Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=8d68f2323040908008fcd023a40f7fadf5641e59 Submitter: Zuul Branch: master
commit 8d68f2323040908008fcd023a40f7fadf5641e59 Author: Matt Riedemann <[email protected]> Date: Sun Mar 25 16:56:19 2018 -0400 Avoid unnecessary port update during live migration The ComputeManager.pre_live_migration method, which runs on the destination host during live migration, calls setup_networks_on_host with the destination host which causes the "migrating_to" attribute to get set to the destination host in the port binding profile. This is to initiate setting up floating IP information on the destination host for DVR. The ComputeManager.post_live_migration_at_destination method calls the same method from the destination host, so at this point the "migrating_to" attribute is already set to the destination host in the port binding profile from pre_live_migration and we make unnecessary port update calls to Neutron for each port attached to the instance. This change simply checks to see if the "migrating_to" attribute is already set to the given host and if so, skips the port update call. Change-Id: I8b2ffd94c5ff0881d0df4efdde9be938888c16d7 Closes-Bug: #1758453 ** 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/1758453 Title: Port binding 'migrating_to' attribute needlessly updated in post-live- migration for neutron Status in OpenStack Compute (nova): Fix Released Bug description: During live migration, the setup_networks_on_host neutronv2 API method checks to see if the provided host is different from the existing instance.host and if so, it knows the instance is being migrated and sets the 'migrating_to' attribute to the new host in the ports binding profile: https://github.com/openstack/nova/blob/55b22a54e65728712670c5dde5a833f5349e5b2f/nova/network/neutronv2/api.py#L351 https://github.com/openstack/nova/blob/55b22a54e65728712670c5dde5a833f5349e5b2f/nova/network/neutronv2/api.py#L322 And then updates the port. That happens in pre_live_migration which runs on the dest host: https://github.com/openstack/nova/blob/55b22a54e65728712670c5dde5a833f5349e5b2f/nova/compute/manager.py#L6007 And it also happens again in post_live_migration_at_destination which runs on the destination host: https://github.com/openstack/nova/blob/55b22a54e65728712670c5dde5a833f5349e5b2f/nova/compute/manager.py#L6382 Since the neutronv2 API code doesn't check to see if the 'migrating_to' attribute is already set: https://github.com/openstack/nova/blob/55b22a54e65728712670c5dde5a833f5349e5b2f/nova/network/neutronv2/api.py#L322 It does a redundant PUT (port update) for no actual change. To manage notifications about this bug go to: https://bugs.launchpad.net/nova/+bug/1758453/+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

