]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Fixes Multiple External Networks issue with DVR
authorSwaminathan Vasudevan <swaminathan.vasudevan@hp.com>
Thu, 18 Dec 2014 01:15:07 +0000 (17:15 -0800)
committerSwaminathan Vasudevan <swaminathan.vasudevan@hp.com>
Wed, 21 Jan 2015 19:51:07 +0000 (11:51 -0800)
commit3794b4a83e68041e24b715135f0ccf09a5631178
treee897f90d87829d5e62065b7d359cbbcd6fbf770d
parent21b20b7e2d4a4ff1a18ef2b19508cab7cca9f27e
Fixes Multiple External Networks issue with DVR

Current L3 agents can support more than one
external network when configured properly.

On DVR routers, router-gateway-set was
returning a 500 error, when two external
networks were configured in the system.

The problem resides in the scheduler where the
bind_router is called twice when the
reschedule_router is called from update_router.

The _schedule_router binds the snat
and the qrouter with the respective agents.

But after scheduling it does not return agent.

And in the case of two external networks, the
get_candidates always returns a valid candidate
to be processed and hence the bind_router is
called twice.

This patch fixes the _schedule_router function
and hence avoids the multiple calls to
bind_router.

This prevents the update_router from failing
and causing the nested rollback for the
transactions.

Change-Id: I24d44c60a3ea5bbc9e3f44aa5191deff315723ca
Closes-Bug: #1374473
neutron/db/l3_dvrscheduler_db.py
neutron/scheduler/l3_agent_scheduler.py
neutron/tests/unit/test_l3_schedulers.py