]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Resync L3, DHCP and OVS/LB agents upon revival
authorEugene Nikanorov <enikanorov@mirantis.com>
Mon, 12 Oct 2015 09:59:01 +0000 (13:59 +0400)
committerEugene Nikanorov <enikanorov@mirantis.com>
Wed, 18 Nov 2015 10:42:35 +0000 (14:42 +0400)
commit3b6bd917e4b968a47a5aacb7f590143fc83816d9
treeebbf52911fddaf418cf9212aadaefb90edc8b6ee
parent0312b1237b1a74aec82163ef863624d2607563d2
Resync L3, DHCP and OVS/LB agents upon revival

In big and busy clusters there could be a condition when
rabbitmq clustering mechanism synchronizes queues and during
this period agents connected to that instance of rabbitmq
can't communicate with the server and server considers them
dead moving resources away. After agent become active again,
it needs to cleanup state entries and synchronize its state
with neutron-server.
The solution is to make agents aware of their state from
neutron-server point of view. This is done by changing state
reports from cast to call that would return agent's status.
When agent was dead and becomes alive, it would receive special
AGENT_REVIVED status indicating that it should refresh its
local data which it would not do otherwise.

Closes-Bug: #1505166
Change-Id: Id28248f4f75821fbacf46e2c44e40f27f59172a9
neutron/agent/dhcp/agent.py
neutron/agent/l3/agent.py
neutron/common/constants.py
neutron/db/agents_db.py
neutron/plugins/ml2/drivers/linuxbridge/agent/linuxbridge_neutron_agent.py
neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py
neutron/tests/unit/agent/dhcp/test_agent.py
neutron/tests/unit/agent/l3/test_agent.py
neutron/tests/unit/plugins/ml2/drivers/linuxbridge/agent/test_linuxbridge_neutron_agent.py
neutron/tests/unit/plugins/ml2/drivers/openvswitch/agent/test_ovs_neutron_agent.py