nova/nova/tests/functional/compute
Artom Lifshitz 2c949cb3ee post live migration: don't call Neutron needlessly
In bug 1879787, the call to network_api.get_instance_nw_info() in
_post_live_migration() on the source compute manager eventually calls
out to the Neutron REST API. If this fails, the exception is
unhandled, and the migrating instance - which is fully running on the
destination at this point - will never be updated in the database.
This update normally happens later in
post_live_migration_at_destination().

The network_info variable obtained from get_instance_nw_info() is used
for two things: notifications - which aren't critical - and unplugging
the instance's vifs on the source - which is very important!

It turns out that at the time of the get_instance_nw_info() call, the
network info in the instance info cache is still valid for unplugging
the source vifs. The port bindings on the destination are only
activated by the network_api.migrate_instance_start() [1] call that
happens shortly *after* the problematic get_instance_nw_info() call.
In other words, get_instance_nw_info() will always return the source
ports. Because of that, we can replace it with a call to
instance.get_network_info().

[1] d9e04c4ff0/nova/network/neutronv2/api.py (L2493-L2522)

Change-Id: If0fbae33ce2af198188c91638afef939256c2556
Closes-bug: 1879787
(cherry picked from commit 6488a5dfb2)
2020-09-08 10:40:04 -04:00
..
__init__.py virt: implement get_inventory() for Ironic 2017-03-15 21:49:25 +00:00
test_cache_image.py func tests: move _run_periodics() into base class 2020-03-24 10:10:53 -04:00
test_host_api.py Use uuidsentinel from oslo.utils 2018-09-05 09:08:54 -05:00
test_init_host.py functional: Add unified '_build_server' helper function 2020-01-15 10:31:24 +00:00
test_instance_list.py Minimal construct plumbing for nova list when a cell is down 2018-10-31 15:12:18 -04:00
test_live_migration.py post live migration: don't call Neutron needlessly 2020-09-08 10:40:04 -04:00
test_migration_list.py Use uuidsentinel from oslo.utils 2018-09-05 09:08:54 -05:00
test_resource_tracker.py Stop using PlacementDirect 2020-03-05 07:36:37 -06:00