Scenario:
Delete 10 subnets in the same network at concurrency, every thread will delete ip that belongs to the deleting subnet on the dhcp port, than neutron-server will send delete-sbunet notification to dhcp agent, dhcp agent restart the network configuration.
Steps:
In thread(A), dhcp agent received the delete-subnet(A) notification, than requests the newest dhcp port and subnets information from neutron-server.
In thread(B), neutron-server just deleted ips that belogs to the deleting subnet(B) on dhcp port, but the subnet(B) still exist.
In thread(A), dhcp agent recieved the newest dhcp port and subnets information from neutron-server, than it find subnet(B) exists, but dhcp port doesn't have fixed_ip under the subnet.
Scenario:
Delete 10 subnets in the same network at concurrency, every thread will delete ip that belongs to the deleting subnet on the dhcp port, than neutron-server will send delete-sbunet notification to dhcp agent, dhcp agent restart the network configuration.
Steps:
In thread(A), dhcp agent received the delete-subnet(A) notification, than requests the newest dhcp port and subnets information from neutron-server.
In thread(B), neutron-server just deleted ips that belogs to the deleting subnet(B) on dhcp port, but the subnet(B) still exist.
In thread(A), dhcp agent recieved the newest dhcp port and subnets information from neutron-server, than it find subnet(B) exists, but dhcp port doesn't have fixed_ip under the subnet.
In this case, dhcp agent will request neutron-server to allocat a fresh IP for subnet(B). https:/ /github. com/openstack/ neutron/ blob/master/ neutron/ agent/linux/ dhcp.py : _setup_ existing_ dhcp_port