Comment 1 for bug 1433940

Revision history for this message
Han Zhou (zhouhan) wrote :

In the code dhcp_rpc_agent_api.py, the logic is:
        enabled_agents = [x for x in agents if x.admin_state_up]
        active_agents = [x for x in agents if x.is_active]
        len_enabled_agents = len(enabled_agents)
        len_active_agents = len(active_agents)
        if len_active_agents < len_enabled_agents:
            LOG.warn(_LW("Only %(active)d of %(total)d DHCP agents associated "
                         "with network '%(net_id)s' are marked as active, so "
                         "notifications may be sent to inactive agents."),
                     {'active': len_active_agents,
                      'total': len_enabled_agents,
                      'net_id': network_id})

I wonder why printing the warning instead of just not sending to those nodes. Or we can send to nodes that are both enabled and active.