← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1892364] [NEW] L3 agent prefix delegation - adding new subnet to the router fails

 

Public bug reported:

Adding new subnet with prefix delegation enabled to the router fails
with error like:

2020-08-20 11:22:41.356 1004285 ERROR neutron.agent.l3.agent [-] Error while deleting router 7ef0983f-60a4-4389-909c-785eb6c9a51e: KeyError: '999e404c-3c33-4123-9c61-99426f2e5c16'
2020-08-20 11:22:41.356 1004285 ERROR neutron.agent.l3.agent Traceback (most recent call last):
2020-08-20 11:22:41.356 1004285 ERROR neutron.agent.l3.agent   File "/usr/lib/python3.6/site-packages/neutron/agent/l3/agent.py", line 438, in _safe_router_removed
2020-08-20 11:22:41.356 1004285 ERROR neutron.agent.l3.agent     self._router_removed(ri, router_id)
2020-08-20 11:22:41.356 1004285 ERROR neutron.agent.l3.agent   File "/usr/lib/python3.6/site-packages/neutron/agent/l3/agent.py", line 474, in _router_removed
2020-08-20 11:22:41.356 1004285 ERROR neutron.agent.l3.agent     self.router_info[router_id] = ri
2020-08-20 11:22:41.356 1004285 ERROR neutron.agent.l3.agent   File "/usr/lib/python3.6/site-packages/oslo_utils/excutils.py", line 220, in __exit__
2020-08-20 11:22:41.356 1004285 ERROR neutron.agent.l3.agent     self.force_reraise()
2020-08-20 11:22:41.356 1004285 ERROR neutron.agent.l3.agent   File "/usr/lib/python3.6/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
2020-08-20 11:22:41.356 1004285 ERROR neutron.agent.l3.agent     six.reraise(self.type_, self.value, self.tb)
2020-08-20 11:22:41.356 1004285 ERROR neutron.agent.l3.agent   File "/usr/lib/python3.6/site-packages/six.py", line 693, in reraise
2020-08-20 11:22:41.356 1004285 ERROR neutron.agent.l3.agent     raise value
2020-08-20 11:22:41.356 1004285 ERROR neutron.agent.l3.agent   File "/usr/lib/python3.6/site-packages/neutron/agent/l3/agent.py", line 471, in _router_removed
2020-08-20 11:22:41.356 1004285 ERROR neutron.agent.l3.agent     ri.delete()
2020-08-20 11:22:41.356 1004285 ERROR neutron.agent.l3.agent   File "/usr/lib/python3.6/site-packages/neutron/agent/l3/router_info.py", line 433, in delete
2020-08-20 11:22:41.356 1004285 ERROR neutron.agent.l3.agent     self.process_delete()
2020-08-20 11:22:41.356 1004285 ERROR neutron.agent.l3.agent   File "/usr/lib/python3.6/site-packages/neutron/common/utils.py", line 161, in call
2020-08-20 11:22:41.356 1004285 ERROR neutron.agent.l3.agent     self.logger(e)
2020-08-20 11:22:41.356 1004285 ERROR neutron.agent.l3.agent   File "/usr/lib/python3.6/site-packages/oslo_utils/excutils.py", line 220, in __exit__
2020-08-20 11:22:41.356 1004285 ERROR neutron.agent.l3.agent     self.force_reraise()
2020-08-20 11:22:41.356 1004285 ERROR neutron.agent.l3.agent   File "/usr/lib/python3.6/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
2020-08-20 11:22:41.356 1004285 ERROR neutron.agent.l3.agent     six.reraise(self.type_, self.value, self.tb)
2020-08-20 11:22:41.356 1004285 ERROR neutron.agent.l3.agent   File "/usr/lib/python3.6/site-packages/six.py", line 693, in reraise
2020-08-20 11:22:41.356 1004285 ERROR neutron.agent.l3.agent     raise value
2020-08-20 11:22:41.356 1004285 ERROR neutron.agent.l3.agent   File "/usr/lib/python3.6/site-packages/neutron/common/utils.py", line 158, in call
2020-08-20 11:22:41.356 1004285 ERROR neutron.agent.l3.agent     return func(*args, **kwargs)
2020-08-20 11:22:41.356 1004285 ERROR neutron.agent.l3.agent   File "/usr/lib/python3.6/site-packages/neutron/agent/l3/router_info.py", line 1167, in process_delete
2020-08-20 11:22:41.356 1004285 ERROR neutron.agent.l3.agent     self._process_internal_ports()
2020-08-20 11:22:41.356 1004285 ERROR neutron.agent.l3.agent   File "/usr/lib/python3.6/site-packages/neutron/agent/l3/router_info.py", line 591, in _process_internal_ports
2020-08-20 11:22:41.356 1004285 ERROR neutron.agent.l3.agent     del self.pd_subnets[subnet['id']]
2020-08-20 11:22:41.356 1004285 ERROR neutron.agent.l3.agent KeyError: '999e404c-3c33-4123-9c61-99426f2e5c16'
2020-08-20 11:22:41.356 1004285 ERROR neutron.agent.l3.agent

I think we should simply handle the case when self.pd_subnets don't have
key with subnet['id'] there.

** Affects: neutron
     Importance: Medium
         Status: Confirmed


** Tags: l3-dvr-backlog

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1892364

Title:
  L3 agent prefix delegation - adding new subnet to the router fails

Status in neutron:
  Confirmed

Bug description:
  Adding new subnet with prefix delegation enabled to the router fails
  with error like:

  2020-08-20 11:22:41.356 1004285 ERROR neutron.agent.l3.agent [-] Error while deleting router 7ef0983f-60a4-4389-909c-785eb6c9a51e: KeyError: '999e404c-3c33-4123-9c61-99426f2e5c16'
  2020-08-20 11:22:41.356 1004285 ERROR neutron.agent.l3.agent Traceback (most recent call last):
  2020-08-20 11:22:41.356 1004285 ERROR neutron.agent.l3.agent   File "/usr/lib/python3.6/site-packages/neutron/agent/l3/agent.py", line 438, in _safe_router_removed
  2020-08-20 11:22:41.356 1004285 ERROR neutron.agent.l3.agent     self._router_removed(ri, router_id)
  2020-08-20 11:22:41.356 1004285 ERROR neutron.agent.l3.agent   File "/usr/lib/python3.6/site-packages/neutron/agent/l3/agent.py", line 474, in _router_removed
  2020-08-20 11:22:41.356 1004285 ERROR neutron.agent.l3.agent     self.router_info[router_id] = ri
  2020-08-20 11:22:41.356 1004285 ERROR neutron.agent.l3.agent   File "/usr/lib/python3.6/site-packages/oslo_utils/excutils.py", line 220, in __exit__
  2020-08-20 11:22:41.356 1004285 ERROR neutron.agent.l3.agent     self.force_reraise()
  2020-08-20 11:22:41.356 1004285 ERROR neutron.agent.l3.agent   File "/usr/lib/python3.6/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
  2020-08-20 11:22:41.356 1004285 ERROR neutron.agent.l3.agent     six.reraise(self.type_, self.value, self.tb)
  2020-08-20 11:22:41.356 1004285 ERROR neutron.agent.l3.agent   File "/usr/lib/python3.6/site-packages/six.py", line 693, in reraise
  2020-08-20 11:22:41.356 1004285 ERROR neutron.agent.l3.agent     raise value
  2020-08-20 11:22:41.356 1004285 ERROR neutron.agent.l3.agent   File "/usr/lib/python3.6/site-packages/neutron/agent/l3/agent.py", line 471, in _router_removed
  2020-08-20 11:22:41.356 1004285 ERROR neutron.agent.l3.agent     ri.delete()
  2020-08-20 11:22:41.356 1004285 ERROR neutron.agent.l3.agent   File "/usr/lib/python3.6/site-packages/neutron/agent/l3/router_info.py", line 433, in delete
  2020-08-20 11:22:41.356 1004285 ERROR neutron.agent.l3.agent     self.process_delete()
  2020-08-20 11:22:41.356 1004285 ERROR neutron.agent.l3.agent   File "/usr/lib/python3.6/site-packages/neutron/common/utils.py", line 161, in call
  2020-08-20 11:22:41.356 1004285 ERROR neutron.agent.l3.agent     self.logger(e)
  2020-08-20 11:22:41.356 1004285 ERROR neutron.agent.l3.agent   File "/usr/lib/python3.6/site-packages/oslo_utils/excutils.py", line 220, in __exit__
  2020-08-20 11:22:41.356 1004285 ERROR neutron.agent.l3.agent     self.force_reraise()
  2020-08-20 11:22:41.356 1004285 ERROR neutron.agent.l3.agent   File "/usr/lib/python3.6/site-packages/oslo_utils/excutils.py", line 196, in force_reraise
  2020-08-20 11:22:41.356 1004285 ERROR neutron.agent.l3.agent     six.reraise(self.type_, self.value, self.tb)
  2020-08-20 11:22:41.356 1004285 ERROR neutron.agent.l3.agent   File "/usr/lib/python3.6/site-packages/six.py", line 693, in reraise
  2020-08-20 11:22:41.356 1004285 ERROR neutron.agent.l3.agent     raise value
  2020-08-20 11:22:41.356 1004285 ERROR neutron.agent.l3.agent   File "/usr/lib/python3.6/site-packages/neutron/common/utils.py", line 158, in call
  2020-08-20 11:22:41.356 1004285 ERROR neutron.agent.l3.agent     return func(*args, **kwargs)
  2020-08-20 11:22:41.356 1004285 ERROR neutron.agent.l3.agent   File "/usr/lib/python3.6/site-packages/neutron/agent/l3/router_info.py", line 1167, in process_delete
  2020-08-20 11:22:41.356 1004285 ERROR neutron.agent.l3.agent     self._process_internal_ports()
  2020-08-20 11:22:41.356 1004285 ERROR neutron.agent.l3.agent   File "/usr/lib/python3.6/site-packages/neutron/agent/l3/router_info.py", line 591, in _process_internal_ports
  2020-08-20 11:22:41.356 1004285 ERROR neutron.agent.l3.agent     del self.pd_subnets[subnet['id']]
  2020-08-20 11:22:41.356 1004285 ERROR neutron.agent.l3.agent KeyError: '999e404c-3c33-4123-9c61-99426f2e5c16'
  2020-08-20 11:22:41.356 1004285 ERROR neutron.agent.l3.agent

  I think we should simply handle the case when self.pd_subnets don't
  have key with subnet['id'] there.

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1892364/+subscriptions


Follow ups