dhcp-agent: too many pending messages for inactive node
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
neutron |
New
|
Medium
|
Han Zhou |
Bug Description
Neutron server keeps sending notification messages (e.g. port create/
The consequence is, when those inactive nodes are back to active, it will stuck if there are too many messages to handle (depends on how long the agent has stayed in inactive state), and sometime failed to start properly due to errors like:
ERROR neutron.
So the proposal is to send notifications to active nodes only.
Changed in neutron: | |
importance: | Undecided → Medium |
status: | In Progress → New |
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.