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.
Related-Bug: #1744361
Change-Id: Ib08afad3822f2ca95cfeea18d7f4fc4cb407b4d6
(cherry picked from commit aaf37a26d6caa124f0cc6c3fe21bfdf58ccb8517)
Reviewed: https:/ /review. openstack. org/542738 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=5a10047f9dd 4383f6ec9046d39 2f26c93f8420d4
Committed: https:/
Submitter: Zuul
Branch: stable/queens
commit 5a10047f9dd4383 f6ec9046d392f26 c93f8420d4
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 4f0cc6c3fe21bfd f58ccb8517)
(cherry picked from commit aaf37a26d6caa12