Regarding waiting for a neutron event callback after we've migrated (resized), we don't wait for any events back from neutron because vifs_already_plugged is set to True:
That only unplugs vifs if the host has changed though, which for the resize tests in the gate with tempest they are the same host, so vifs wouldn't be unplugged on resize to the same host, but still seems like we have a bug waiting to happen here.
Talking with dansmith in IRC, apparently in finish_migration we pass vifs_already_plugged=True even if the host has changed because apparently neutron will not send the vif plugged event twice (or for a resize/migrate), even if the host changed. When they were waiting on that when the neutron callback code was previously added it was stalling out in the gate b/c nova was waiting for an event from neutron that would never come. We should at least document something in the code that explains this and have the neutron cores assert and explain why.
Regarding waiting for a neutron event callback after we've migrated (resized), we don't wait for any events back from neutron because vifs_already_ plugged is set to True:
http:// git.openstack. org/cgit/ openstack/ nova/tree/ nova/virt/ libvirt/ driver. py#n6358
This doesn't seem necessarily correct, the things that call unplug_vifs are _cleanup_reize:
http:// git.openstack. org/cgit/ openstack/ nova/tree/ nova/virt/ libvirt/ driver. py#n957
which is called from confirm_migration:
http:// git.openstack. org/cgit/ openstack/ nova/tree/ nova/virt/ libvirt/ driver. py#n6415
That only unplugs vifs if the host has changed though, which for the resize tests in the gate with tempest they are the same host, so vifs wouldn't be unplugged on resize to the same host, but still seems like we have a bug waiting to happen here.
The other place is post live migration:
http:// git.openstack. org/cgit/ openstack/ nova/tree/ nova/virt/ libvirt/ driver. py#n5927
Talking with dansmith in IRC, apparently in finish_migration we pass vifs_already_ plugged= True even if the host has changed because apparently neutron will not send the vif plugged event twice (or for a resize/migrate), even if the host changed. When they were waiting on that when the neutron callback code was previously added it was stalling out in the gate b/c nova was waiting for an event from neutron that would never come. We should at least document something in the code that explains this and have the neutron cores assert and explain why.