Updated openstack/openstack
Project: openstack/nova  7f01f27e8450803271cda5e80f700efaffcef50a

Fix race condition with vif plugging in finish migrate

The tempest test that does a resize on an instance from time to time fails
with neutron with a virtual interface timout error. The reason why this
occurs is that nova-compute calls a vifs_unplug() then vifs_plug() fairly
quickly and the neutron-agent doesn't realize this happens because the way
it detects this is via polling. This patch fixings this problem by passing
vifs_already_plugged=True to _create_domain_and_network to avoid waiting
for the neutron notifcation.

Initially, I thought this problem could be solved by setting
vifs_already_plugged=True if migrate.source_host == migrate_desk.dest_host
but it turns out that this race condition can still occur if migrated to
another host though it's fairly unlikely. Always setting
vifs_already_plugged=True ensures we never hit this issue on migrate.

Change-Id: I90424ad50ac993c4abb049aa0654a94b225b5ebb
Closes-bug: 1357599
Closes-bug: 1357476