This patch introduces mechanism similar to compare-and-swap
for updating reserved DHCP port.
This addresses a case when two DHCP agents that start nearly at
the same time are assigned to one network and there is a reserved
DHCP port in the network. Then each of agents will try to use it
because agents don't check if reserved port is still available.
Reserved DHCP port can be acquired by different agent between calls to
get_active_networks and update_port, so this patch adds a check for
this case.
Reviewed: https:/ /review. openstack. org/236983 /git.openstack. org/cgit/ openstack/ neutron/ commit/ ?id=f76ef76f251 6dad794818ce56f b15d16437f7314
Committed: https:/
Submitter: Jenkins
Branch: master
commit f76ef76f2516dad 794818ce56fb15d 16437f7314
Author: Eugene Nikanorov <email address hidden>
Date: Mon Oct 19 17:41:32 2015 +0400
Avoid race condition for reserved DHCP ports
This patch introduces mechanism similar to compare-and-swap
for updating reserved DHCP port.
This addresses a case when two DHCP agents that start nearly at active_ networks and update_port, so this patch adds a check for
the same time are assigned to one network and there is a reserved
DHCP port in the network. Then each of agents will try to use it
because agents don't check if reserved port is still available.
Reserved DHCP port can be acquired by different agent between calls to
get_
this case.
Change-Id: I0277ab537ff9d3 a664c03ea291b9e c2b0e784dbb
Closes-Bug: #1425402