]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
fix check_ports_exist_on_l3agent in no subnet case
authorlzklibj <lzklibj@cn.ibm.com>
Thu, 26 Feb 2015 05:19:07 +0000 (21:19 -0800)
committerZongKai LI <lzklibj@cn.ibm.com>
Fri, 13 Mar 2015 11:45:39 +0000 (11:45 +0000)
commite99f6e00cfd397bb74d44c9462dfcfa545dbed8c
tree5c59506d9a0717fdd08a78cd542d4c9644190340
parente6265f010869c961156de531f85eb89d9cefdf64
fix check_ports_exist_on_l3agent in no subnet case

If no subnets attached to the given router, this check
should return False.

Currently, if no subnets attached to given router, the
following process in this method will fetch all ports
to continue its checking, consider those ports are not
related to the given router, the following checking
should be invalid.

To issue #1378066, after running "router-gateway-clear",
_schedule_router will be triggered, and the invalid
checking will make processing in get_candidates believe
that all l3-agents are valid to schedule this router,
and finally, invalid records are inserted into table
RouterL3AgentBindings.

Closes-Bug: #1378066
Closes-Bug: #1417908
Closes-Bug: #1420032

Change-Id: If96d866c831330cca68a5fe5a0f27f178bbf40a6
neutron/db/l3_agentschedulers_db.py
neutron/tests/unit/test_l3_schedulers.py