I faced the bug while reworking unit tests into functional tests: when performing steps described in the description I get:
2015-12-15 17:41:23,484 ERROR [neutron.callbacks.manager] Error during notification for neutron.db.l3_dvrscheduler_db._notify_port_delete port, after_delete
Traceback (most recent call last):
File "neutron/callbacks/manager.py", line 141, in _notify_loop callback(resource, event, trigger, **kwargs)
File "neutron/db/l3_dvrscheduler_db.py", line 485, in _notify_port_delete
context, router['agent_id'], router['router_id'])
File "neutron/db/l3_dvrscheduler_db.py", line 439, in remove_router_from_l3_agent
router = self.get_router(context, router_id)
File "neutron/db/l3_db.py", line 451, in get_router
router = self._get_router(context, id)
File "neutron/db/l3_db.py", line 137, in _get_router
raise l3.RouterNotFound(router_id=router_id)
RouterNotFound: Router 7d52836b-8fe5-4417-842f-3cbe0920c89c could not be found
and router is not removed from host which has no more dvr serviceable ports.
Looks like we also need admin context in order to remove admin router from a host when non-admin tenant removes last dvr serviceable port on a shared network.
I faced the bug while reworking unit tests into functional tests: when performing steps described in the description I get: callbacks. manager] Error during notification for neutron. db.l3_dvrschedu ler_db. _notify_ port_delete port, after_delete callbacks/ manager. py", line 141, in _notify_loop
callback( resource, event, trigger, **kwargs) db/l3_dvrschedu ler_db. py", line 485, in _notify_port_delete 'router_ id']) db/l3_dvrschedu ler_db. py", line 439, in remove_ router_ from_l3_ agent router( context, router_id) db/l3_db. py", line 451, in get_router router( context, id) db/l3_db. py", line 137, in _get_router nd(router_ id=router_ id) 8fe5-4417- 842f-3cbe0920c8 9c could not be found
2015-12-15 17:41:23,484 ERROR [neutron.
Traceback (most recent call last):
File "neutron/
File "neutron/
context, router['agent_id'], router[
File "neutron/
router = self.get_
File "neutron/
router = self._get_
File "neutron/
raise l3.RouterNotFou
RouterNotFound: Router 7d52836b-
and router is not removed from host which has no more dvr serviceable ports.
Looks like we also need admin context in order to remove admin router from a host when non-admin tenant removes last dvr serviceable port on a shared network.