yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #80950
[Bug 1854723] Re: Avoid raising NetworkInterfaceNotFound exception in DHCP agent logs
Reviewed: https://review.opendev.org/696940
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=8cc2765b5fdd229c9f6f19b83ad9e1ba030040ae
Submitter: Zuul
Branch: master
commit 8cc2765b5fdd229c9f6f19b83ad9e1ba030040ae
Author: Rodolfo Alonso Hernandez <ralonsoh@xxxxxxxxxx>
Date: Mon Dec 2 11:48:28 2019 +0000
Avoid raising NetworkInterfaceNotFound exception in DHCP agent logs
In "ip_lib.ensure_device_is_ready", before retrieving the interface
attributes, a check is done to know if the interface exists. In case
it does not exist, the exception "NetworkInterfaceNotFound" will not
be raised and written in the logs.
Change-Id: I4b9fd0885d850601717274a5058e042871211bbb
Closes-Bug: #1854723
** Changed in: neutron
Status: In Progress => Fix Released
--
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 raising NetworkInterfaceNotFound exception in DHCP agent logs
Status in neutron:
Fix Released
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
References