Concurrent calls to _bind_port_if_needed may lead to a missing RPC
notification which can cause a port stuck in a DOWN state. If the only
caller that succeeds in the concurrency does not specify that an RPC
notification is allowed then no RPC would be sent to the agent. The
other caller which needs to send an RPC notification will fail since the
resulting PortContext instance will not have any binding levels set.
The failure has negative effects on consumers of the L2Population
functionality because the L2Population mechanism driver will not be
triggered to publish that a port is UP on a given compute node. Manual
intervention is required in this case.
This patch proposes to handle this by populating the PortContext with
the current binding levels so that the caller can continue on and have
an RPC notification sent out.
Reviewed: https:/ /review. opendev. org/606827 /git.openstack. org/cgit/ openstack/ neutron/ commit/ ?id=0dc730c7c0d 3f0a49dee28d0d6 e7ff9020d94443
Committed: https:/
Submitter: Zuul
Branch: master
commit 0dc730c7c0d3f0a 49dee28d0d6e7ff 9020d94443
Author: Kailun Qin <email address hidden>
Date: Wed May 1 15:50:48 2019 +0800
Populate binding levels when concurrent ops fail
Concurrent calls to _bind_port_ if_needed may lead to a missing RPC
notification which can cause a port stuck in a DOWN state. If the only
caller that succeeds in the concurrency does not specify that an RPC
notification is allowed then no RPC would be sent to the agent. The
other caller which needs to send an RPC notification will fail since the
resulting PortContext instance will not have any binding levels set.
The failure has negative effects on consumers of the L2Population
functionality because the L2Population mechanism driver will not be
triggered to publish that a port is UP on a given compute node. Manual
intervention is required in this case.
This patch proposes to handle this by populating the PortContext with
the current binding levels so that the caller can continue on and have
an RPC notification sent out.
Closes-Bug: #1755810 fb3c24743dbd134 87ace6ee76a
Story: 2003922
Change-Id: Ie2b813b2bdf181