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