Refine waiting for vif plug events during _hard_reboot
In change Ib0cf5d55750f13d0499a570f14024dca551ed4d4, we stopped waiting
for vif plug events during hard reboot and start, because the behavior
of neutron plug events depended on the vif type and we couldn't rely on
the stale network info cache.
This refines the logic not to wait for vif plug events only for the
bridge vif type, instead of for all types. We also add a flag to
_create_domain_and_network to indicate that we're in the middle of a
reboot and to expect to wait for plug events for all vif types except
the bridge vif type, regardless of the vif's 'active' status.
We only query network_info from neutron at the beginning of a reboot,
before we've unplugged anything, so the majority of the time, the vifs
will be active=True. The current logic in get_neutron_events will only
expect events for vifs with 'active' status False. This adds a way to
override that if we know we've already unplugged vifs as part of a
reboot.
Reviewed: https:/ /review. openstack. org/541442 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=aaf37a26d6c aa124f0cc6c3fe2 1bfdf58ccb8517
Committed: https:/
Submitter: Zuul
Branch: master
commit aaf37a26d6caa12 4f0cc6c3fe21bfd f58ccb8517
Author: melanie witt <email address hidden>
Date: Tue Feb 6 20:32:33 2018 +0000
Refine waiting for vif plug events during _hard_reboot
In change Ib0cf5d55750f13 d0499a570f14024 dca551ed4d4, we stopped waiting
for vif plug events during hard reboot and start, because the behavior
of neutron plug events depended on the vif type and we couldn't rely on
the stale network info cache.
This refines the logic not to wait for vif plug events only for the domain_ and_network to indicate that we're in the middle of a
bridge vif type, instead of for all types. We also add a flag to
_create_
reboot and to expect to wait for plug events for all vif types except
the bridge vif type, regardless of the vif's 'active' status.
We only query network_info from neutron at the beginning of a reboot,
before we've unplugged anything, so the majority of the time, the vifs
will be active=True. The current logic in get_neutron_events will only
expect events for vifs with 'active' status False. This adds a way to
override that if we know we've already unplugged vifs as part of a
reboot.
Related-Bug: #1744361
Change-Id: Ib08afad3822f2c a95cfeea18d7f4f c4cb407b4d6