]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Unify logic that determines liveliness of DHCP agent
authorEugene Nikanorov <enikanorov@mirantis.com>
Wed, 4 Feb 2015 12:05:36 +0000 (15:05 +0300)
committerEugene Nikanorov <enikanorov@mirantis.com>
Thu, 19 Feb 2015 07:06:04 +0000 (11:06 +0400)
commit28fe7e85cc26d1a0254990ebee1bececae06f374
treedfb6e83194a40c9dd4b6028b76568a70b3ffd596
parentb672a19c3574a1081150d451a2d503703d07efee
Unify logic that determines liveliness of DHCP agent

For DHCP agents sometimes it's not enough to check agent's last heartbeat
time because in its starting period the agent may fail to send state reports
because it's busy processing networks.
In rescheduling logic such DHCP agent is given additional time after start.
Additional time is proportional to amount of networks the agent is hosting.
Need to apply the same logic to DHCP agent scheduler to avoid a case
when starting agent is considered dead and a network gets more hosting
agents than configured.

Change-Id: I0fe6244c7d2ed42e4744351be34f251318322c54
Closes-Bug: #1417708
neutron/db/agentschedulers_db.py
neutron/scheduler/dhcp_agent_scheduler.py
neutron/tests/unit/openvswitch/test_agent_scheduler.py
neutron/tests/unit/test_dhcp_scheduler.py