Comment 13 for bug 1470612

Revision history for this message
shihanzhang (shihanzhang) wrote :

@Shraddha Pandhe, maybe it was my devstack environment problem when I test it at #6 comment, today I test is with latest master codes, there is no this problem, then I read the codes in /dhcp/agents.py carefully, I think your analysis is correct, in sync_state funcition, it will call 'configure_dhcp_for_network', when it call driver 'enable' successfully, it will put this network which includes 'network, subnet, ports' info in cache with 'self.cache.put(network)'
    def configure_dhcp_for_network(self, network):
        if not network.admin_state_up:
            return

        enable_metadata = self.dhcp_driver_cls.should_enable_metadata(
                self.conf, network)
        dhcp_network_enabled = False

        for subnet in network.subnets:
            if subnet.enable_dhcp:
                if self.call_driver('enable', network):
                    dhcp_network_enabled = True
                    self.cache.put(network)
                break