nova/nova/tests
Artom Lifshitz a1d3ae3876 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().

Small conflict in nova/tests/unit/compute/test_compute_mgr.py due to
different mocks in the context.

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

Change-Id: If0fbae33ce2af198188c91638afef939256c2556
Closes-bug: 1879787
(cherry picked from commit 6488a5dfb2)
(cherry picked from commit 2c949cb3ee)
(cherry picked from commit 7ace26e4bc)
(cherry picked from commit 703c8ef4e6)
2020-09-09 10:32:43 -04:00
..
functional Merge "FUP for in-place numa rebuild" into stable/rocky 2020-08-18 02:30:24 +00:00
live_migration/hooks Fix os_CODENAME detection and repo refresh during ceph tests 2020-07-09 09:31:20 +01:00
unit post live migration: don't call Neutron needlessly 2020-09-09 10:32:43 -04:00
__init__.py
fixtures.py Fix race in test_volume_swap_server_with_error 2019-03-02 14:38:25 +00:00
json_ref.py Transform instance.exists notification 2018-06-05 12:51:30 +00:00
uuidsentinel.py