← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1854723] [NEW] Avoid NetworkInterfaceNotFound exception in DHCP agent logs

 

Public bug reported:

In normal operation, when the DHCP agent checks the namespace interfaces
used by the DHCP process, if this interface does not exist, an exception
is written in the log.

Because not having this interface is something that can usually happen
in normal operation, we should avoid raising and writing this exception.

LOG EXAMPLE:
Dec 01 23:47:07.061850 ubuntu-bionic-ovh-bhs1-0013157001 neutron-dhcp-agent[20147]: DEBUG oslo.privsep.daemon [-] privsep: Exception during request[139719361762872]: Network interface tap88ffe0d6-f0 not found in namespace qdhcp-da607b3b-d956-4468-837f-ffbfbc69d852. {{(pid=21921) _process_cmd /usr/local/lib/python3.6/dist-packages/oslo_privsep/daemon.py:454}}
Dec 01 23:47:07.061850 ubuntu-bionic-ovh-bhs1-0013157001 neutron-dhcp-agent[20147]: Traceback (most recent call last):
Dec 01 23:47:07.061850 ubuntu-bionic-ovh-bhs1-0013157001 neutron-dhcp-agent[20147]:   File "/opt/stack/old/neutron/neutron/privileged/agent/linux/ip_lib.py", line 246, in get_link_id
Dec 01 23:47:07.061850 ubuntu-bionic-ovh-bhs1-0013157001 neutron-dhcp-agent[20147]:     return ip.link_lookup(ifname=device)[0]
Dec 01 23:47:07.061850 ubuntu-bionic-ovh-bhs1-0013157001 neutron-dhcp-agent[20147]: IndexError: list index out of range
Dec 01 23:47:07.061850 ubuntu-bionic-ovh-bhs1-0013157001 neutron-dhcp-agent[20147]: During handling of the above exception, another exception occurred:
Dec 01 23:47:07.061850 ubuntu-bionic-ovh-bhs1-0013157001 neutron-dhcp-agent[20147]: Traceback (most recent call last):
Dec 01 23:47:07.061850 ubuntu-bionic-ovh-bhs1-0013157001 neutron-dhcp-agent[20147]:   File "/usr/local/lib/python3.6/dist-packages/oslo_privsep/daemon.py", line 449, in _process_cmd
Dec 01 23:47:07.061850 ubuntu-bionic-ovh-bhs1-0013157001 neutron-dhcp-agent[20147]:     ret = func(*f_args, **f_kwargs)
Dec 01 23:47:07.061850 ubuntu-bionic-ovh-bhs1-0013157001 neutron-dhcp-agent[20147]:   File "/opt/stack/old/neutron/neutron/privileged/agent/linux/ip_lib.py", line 53, in sync_inner
Dec 01 23:47:07.061850 ubuntu-bionic-ovh-bhs1-0013157001 neutron-dhcp-agent[20147]:     return input_func(*args, **kwargs)
Dec 01 23:47:07.061850 ubuntu-bionic-ovh-bhs1-0013157001 neutron-dhcp-agent[20147]:   File "/usr/local/lib/python3.6/dist-packages/oslo_privsep/priv_context.py", line 247, in _wrap
Dec 01 23:47:07.061850 ubuntu-bionic-ovh-bhs1-0013157001 neutron-dhcp-agent[20147]:     return func(*args, **kwargs)
Dec 01 23:47:07.061850 ubuntu-bionic-ovh-bhs1-0013157001 neutron-dhcp-agent[20147]:   File "/opt/stack/old/neutron/neutron/privileged/agent/linux/ip_lib.py", line 406, in get_link_attributes
Dec 01 23:47:07.061850 ubuntu-bionic-ovh-bhs1-0013157001 neutron-dhcp-agent[20147]:     link = _run_iproute_link("get", device, namespace)[0]
Dec 01 23:47:07.061850 ubuntu-bionic-ovh-bhs1-0013157001 neutron-dhcp-agent[20147]:   File "/opt/stack/old/neutron/neutron/privileged/agent/linux/ip_lib.py", line 254, in _run_iproute_link
Dec 01 23:47:07.061850 ubuntu-bionic-ovh-bhs1-0013157001 neutron-dhcp-agent[20147]:     idx = get_link_id(device, namespace)
Dec 01 23:47:07.061850 ubuntu-bionic-ovh-bhs1-0013157001 neutron-dhcp-agent[20147]:   File "/opt/stack/old/neutron/neutron/privileged/agent/linux/ip_lib.py", line 248, in get_link_id
Dec 01 23:47:07.061850 ubuntu-bionic-ovh-bhs1-0013157001 neutron-dhcp-agent[20147]:     raise NetworkInterfaceNotFound(device=device, namespace=namespace)
Dec 01 23:47:07.061850 ubuntu-bionic-ovh-bhs1-0013157001 neutron-dhcp-agent[20147]: neutron.privileged.agent.linux.ip_lib.NetworkInterfaceNotFound: Network interface tap88ffe0d6-f0 not found in namespace qdhcp-da607b3b-d956-4468-837f-ffbfbc69d852.

** Affects: neutron
     Importance: Undecided
     Assignee: Rodolfo Alonso (rodolfo-alonso-hernandez)
         Status: New

** Changed in: neutron
     Assignee: (unassigned) => Rodolfo Alonso (rodolfo-alonso-hernandez)

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

Title:
  Avoid NetworkInterfaceNotFound exception in DHCP agent logs

Status in neutron:
  New

Bug description:
  In normal operation, when the DHCP agent checks the namespace
  interfaces used by the DHCP process, if this interface does not exist,
  an exception is written in the log.

  Because not having this interface is something that can usually happen
  in normal operation, we should avoid raising and writing this
  exception.

  LOG EXAMPLE:
  Dec 01 23:47:07.061850 ubuntu-bionic-ovh-bhs1-0013157001 neutron-dhcp-agent[20147]: DEBUG oslo.privsep.daemon [-] privsep: Exception during request[139719361762872]: Network interface tap88ffe0d6-f0 not found in namespace qdhcp-da607b3b-d956-4468-837f-ffbfbc69d852. {{(pid=21921) _process_cmd /usr/local/lib/python3.6/dist-packages/oslo_privsep/daemon.py:454}}
  Dec 01 23:47:07.061850 ubuntu-bionic-ovh-bhs1-0013157001 neutron-dhcp-agent[20147]: Traceback (most recent call last):
  Dec 01 23:47:07.061850 ubuntu-bionic-ovh-bhs1-0013157001 neutron-dhcp-agent[20147]:   File "/opt/stack/old/neutron/neutron/privileged/agent/linux/ip_lib.py", line 246, in get_link_id
  Dec 01 23:47:07.061850 ubuntu-bionic-ovh-bhs1-0013157001 neutron-dhcp-agent[20147]:     return ip.link_lookup(ifname=device)[0]
  Dec 01 23:47:07.061850 ubuntu-bionic-ovh-bhs1-0013157001 neutron-dhcp-agent[20147]: IndexError: list index out of range
  Dec 01 23:47:07.061850 ubuntu-bionic-ovh-bhs1-0013157001 neutron-dhcp-agent[20147]: During handling of the above exception, another exception occurred:
  Dec 01 23:47:07.061850 ubuntu-bionic-ovh-bhs1-0013157001 neutron-dhcp-agent[20147]: Traceback (most recent call last):
  Dec 01 23:47:07.061850 ubuntu-bionic-ovh-bhs1-0013157001 neutron-dhcp-agent[20147]:   File "/usr/local/lib/python3.6/dist-packages/oslo_privsep/daemon.py", line 449, in _process_cmd
  Dec 01 23:47:07.061850 ubuntu-bionic-ovh-bhs1-0013157001 neutron-dhcp-agent[20147]:     ret = func(*f_args, **f_kwargs)
  Dec 01 23:47:07.061850 ubuntu-bionic-ovh-bhs1-0013157001 neutron-dhcp-agent[20147]:   File "/opt/stack/old/neutron/neutron/privileged/agent/linux/ip_lib.py", line 53, in sync_inner
  Dec 01 23:47:07.061850 ubuntu-bionic-ovh-bhs1-0013157001 neutron-dhcp-agent[20147]:     return input_func(*args, **kwargs)
  Dec 01 23:47:07.061850 ubuntu-bionic-ovh-bhs1-0013157001 neutron-dhcp-agent[20147]:   File "/usr/local/lib/python3.6/dist-packages/oslo_privsep/priv_context.py", line 247, in _wrap
  Dec 01 23:47:07.061850 ubuntu-bionic-ovh-bhs1-0013157001 neutron-dhcp-agent[20147]:     return func(*args, **kwargs)
  Dec 01 23:47:07.061850 ubuntu-bionic-ovh-bhs1-0013157001 neutron-dhcp-agent[20147]:   File "/opt/stack/old/neutron/neutron/privileged/agent/linux/ip_lib.py", line 406, in get_link_attributes
  Dec 01 23:47:07.061850 ubuntu-bionic-ovh-bhs1-0013157001 neutron-dhcp-agent[20147]:     link = _run_iproute_link("get", device, namespace)[0]
  Dec 01 23:47:07.061850 ubuntu-bionic-ovh-bhs1-0013157001 neutron-dhcp-agent[20147]:   File "/opt/stack/old/neutron/neutron/privileged/agent/linux/ip_lib.py", line 254, in _run_iproute_link
  Dec 01 23:47:07.061850 ubuntu-bionic-ovh-bhs1-0013157001 neutron-dhcp-agent[20147]:     idx = get_link_id(device, namespace)
  Dec 01 23:47:07.061850 ubuntu-bionic-ovh-bhs1-0013157001 neutron-dhcp-agent[20147]:   File "/opt/stack/old/neutron/neutron/privileged/agent/linux/ip_lib.py", line 248, in get_link_id
  Dec 01 23:47:07.061850 ubuntu-bionic-ovh-bhs1-0013157001 neutron-dhcp-agent[20147]:     raise NetworkInterfaceNotFound(device=device, namespace=namespace)
  Dec 01 23:47:07.061850 ubuntu-bionic-ovh-bhs1-0013157001 neutron-dhcp-agent[20147]: neutron.privileged.agent.linux.ip_lib.NetworkInterfaceNotFound: Network interface tap88ffe0d6-f0 not found in namespace qdhcp-da607b3b-d956-4468-837f-ffbfbc69d852.

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


Follow ups