[L3] Let agent extension do delete router first

For some agent extension implementation, it may need the router_info
to do some clean up work. So this patch just moves the extension
delete action forward.

Closes-Bug: #1897423
Change-Id: I3434ec7c0942229b99e67de7500090dedb37b13f
This commit is contained in:
LIU Yulong 2020-06-17 23:06:38 +08:00
parent 492c7a3b33
commit d13efc6314
1 changed files with 1 additions and 1 deletions

View File

@ -511,9 +511,9 @@ class L3NATAgent(ha.AgentMixin,
ri = self.router_info.get(router_id)
try:
self._router_removed(ri, router_id)
if ri:
self.l3_ext_manager.delete_router(self.context, ri.router)
self._router_removed(ri, router_id)
except Exception:
LOG.exception('Error while deleting router %s', router_id)
return False