I think I found the answer. It looks like this was already documented in our code in a different place [1]:
# NOTE(mriedem): vifs_already_plugged=True here, regardless of whether
# or not we've migrated to another host, because we unplug VIFs locally
# and the status change in the port might go undetected by the neutron
# L2 agent (or neutron server) so neutron may not know that the VIF was
# unplugged in the first place and never send an event.
guest = self._create_domain_and_network(context, xml, instance, network_info, block_device_info=block_device_info, power_on=power_on, vifs_already_plugged=True, post_xml_callback=gen_confdrive)
So, we shouldn't be waiting for vif plug events if we've only locally unplugged vifs.
I think I found the answer. It looks like this was already documented in our code in a different place [1]:
# NOTE(mriedem): vifs_already_ plugged= True here, regardless of whether domain_ and_network( context, xml, instance,
network_ info,
block_ device_ info=block_ device_ info,
power_ on=power_ on,
vifs_ already_ plugged= True,
post_ xml_callback= gen_confdrive)
# or not we've migrated to another host, because we unplug VIFs locally
# and the status change in the port might go undetected by the neutron
# L2 agent (or neutron server) so neutron may not know that the VIF was
# unplugged in the first place and never send an event.
guest = self._create_
So, we shouldn't be waiting for vif plug events if we've only locally unplugged vifs.
[1] https:/ /github. com/openstack/ nova/blob/ d189e68/ nova/virt/ libvirt/ driver. py#L8088- L8092