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.
Reviewed: https:/ /review. openstack. org/195223 /git.openstack. org/cgit/ openstack/ neutron/ commit/ ?id=884013c8cdf e97d297103b0fea da849ecad7c113
Committed: https:/
Submitter: Jenkins
Branch: stable/juno
commit 884013c8cdfe97d 297103b0feada84 9ecad7c113
Author: Swaminathan Vasudevan <email address hidden>
Date: Wed Dec 17 17:15:07 2014 -0800
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 router is called from update_router.
bind_router is called twice when the
reschedule_
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.
Conflicts:
neutron/ tests/unit/ test_l3_ schedulers. py
(cherry picked from commit 3794b4a83e68041 e24b715135f0ccf 09a5631178) bc9e3f44aa5191d eff315723ca
Change-Id: I24d44c60a3ea5b
Closes-Bug: #1374473