Removing a router twice from the same agent shouldn't cause an error
When we remove a router from an agent that has already been
unscheduled from we raise an exception that eventually causes an error.
The method '_unbind_router' raises a 'RouterNotHostedByL3Agent' exception
on failure. In both cases the actual removal of the router
from the same agent has no effect.
The solution is to stop raising 'RouterNotHostedByL3Agent' so
that _unbind_router() being invoked without error can indicate that
the router is no longer bound.
This solution matches the behaviour found when trying
to schedule a router to the same agent twice.
Reviewed: https:/ /review. openstack. org/148883 /git.openstack. org/cgit/ openstack/ neutron/ commit/ ?id=f78ce6782a5 7d6fd63c6e1dabd 6a45cbd5c458cc
Committed: https:/
Submitter: Jenkins
Branch: master
commit f78ce6782a57d6f d63c6e1dabd6a45 cbd5c458cc
Author: Yoni Shafrir <email address hidden>
Date: Wed Jan 21 08:25:50 2015 +0200
Removing a router twice from the same agent shouldn't cause an error
When we remove a router from an agent that has already been dByL3Agent' exception
unscheduled from we raise an exception that eventually causes an error.
The method '_unbind_router' raises a 'RouterNotHoste
on failure. In both cases the actual removal of the router
from the same agent has no effect.
The solution is to stop raising 'RouterNotHoste dByL3Agent' so
that _unbind_router() being invoked without error can indicate that
the router is no longer bound.
This solution matches the behaviour found when trying
to schedule a router to the same agent twice.
This change is a result of the discussion in:
https:/ /review. openstack. org/#/c/ 144681/ 2
Closes-Bug: #1406705
Change-Id: I015bfc0fde11ba 4f39417e4c134fa a8132cb3eac