Call enable DHCP only if there are subnets with enabled DHCP in network
In the configure_dhcp_for_network() method in the DHCP agent, we should
call "enable" from the DHCP driver, and put ports as dhcp_ready_ports
only if there are subnets with enabled DHCP service in that network.
Before this patch it was done for network if there were ANY subnets
there. That in some rare condition could result in calling enable()
method from the DHCP driver, and putting ports into dhcp_ready_ports
set even if there were only subnets with disabled dhcp there.
That could cause the problem with reporting provisioning block completed
by the DHCP entity and lead to unexpected transition of the port from
DOWN to UP state on the server side.
Reviewed: https:/ /review. opendev. org/c/openstack /neutron/ +/824982 /opendev. org/openstack/ neutron/ commit/ 1562f9141ba9c90 c69c1c851dd9a50 c8108ab15f
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit 1562f9141ba9c90 c69c1c851dd9a50 c8108ab15f
Author: Slawek Kaplonski <email address hidden>
Date: Mon Jan 17 17:02:07 2022 +0100
Call enable DHCP only if there are subnets with enabled DHCP in network
In the configure_ dhcp_for_ network( ) method in the DHCP agent, we should
call "enable" from the DHCP driver, and put ports as dhcp_ready_ports
only if there are subnets with enabled DHCP service in that network.
Before this patch it was done for network if there were ANY subnets
there. That in some rare condition could result in calling enable()
method from the DHCP driver, and putting ports into dhcp_ready_ports
set even if there were only subnets with disabled dhcp there.
That could cause the problem with reporting provisioning block completed
by the DHCP entity and lead to unexpected transition of the port from
DOWN to UP state on the server side.
Related-Bug: 1953478 996b9ba486f8ef6 14c92b242d5
Change-Id: I8b2cc04a824cd7