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.
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)
LOG. warn(_LW( "Only %(active)d of %(total)d DHCP agents associated "
"with network '%(net_id)s' are marked as active, so "
"notificati ons may be sent to inactive agents."),
{'active' : len_active_agents,
'total' : len_enabled_agents,
'net_id' : network_id})
if len_active_agents < len_enabled_agents:
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.