]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Fix auto_schedule_networks to resist DBDuplicateEntry
authorEugene Nikanorov <enikanorov@mirantis.com>
Wed, 18 Jun 2014 13:02:42 +0000 (17:02 +0400)
committerEugene Nikanorov <enikanorov@mirantis.com>
Fri, 20 Jun 2014 09:20:20 +0000 (13:20 +0400)
commit3867174bc82b7fd85dd79bc0cc5625a15df2d8fb
tree5d20b218dc11095006be9d7f542d8c42f511e1c3
parent4482f4669070fb86b87f747bba678e1950650216
Fix auto_schedule_networks to resist DBDuplicateEntry

This exception may happen if API and RPC workers are in different
processes.
Also make minor refactoring of auto_schedule_networks method
to avoid unnecessary db queries.
Add missing unit tests and adjust unit test naming style

Change-Id: I6460744e2cffec0b9f009da071597374d8c027f6
Closes-Bug: #1331456
neutron/scheduler/dhcp_agent_scheduler.py
neutron/tests/unit/test_dhcp_scheduler.py