Comment 11 for bug 1958955

Revision history for this message
Harald Jensås (harald-jensas) wrote :

Ooops, hit submit too soon. Following up from previous post:

I belive change[1] is the culprit.

- if len(network.subnets) and self.call_driver('enable', network):
+ if (any(s for s in network.subnets if s.enable_dhcp) and
+ self.call_driver('enable', network)):

In CI we never see "Calling driver for network <UUID>" logged, which is logged by call_driver() see[2]. I do see that logged in my local env where dnsmasq is properly spawned.

There must be somethin, a race?, causing the new condition on `enable_dhcp` for the subnets to compute as False. So the call_driver() method and this entire conditioned block[3] does not run:

        if (any(s for s in network.subnets if s.enable_dhcp) and
                self.call_driver('enable', network)):
            self.update_isolated_metadata_proxy(network)
            self.cache.put(network)
            # After enabling dhcp for network, mark all existing
            # ports as ready. So that the status of ports which are
            # created before enabling dhcp can be updated.
            self.dhcp_ready_ports |= {p.id for p in network.ports}

[1] https://opendev.org/openstack/neutron/commit/1562f9141ba9c90c69c1c851dd9a50c8108ab15f
[2] 2022-01-28 17:49:06.766 35283 DEBUG neutron.agent.dhcp.agent [-] Calling driver for network: 58a36bab-8a1b-43a4-bd83-cb153f4d2232 action: enable call_driver /usr/lib/python3.6/site-packages/neutron/agent/dhcp/agent.py:203
[3] https://opendev.org/openstack/neutron/src/branch/master/neutron/agent/dhcp/agent.py#L403-L410