yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #80463
[Bug 1849449] [NEW] get_link_id() traceback in case of non-existing interface is misleading
Public bug reported:
When privileged.agent.linux.ip_lib.get_link_id() method does not find
the interface, the traceback thrown is misleading: first the index error
is logged and then NetworkInterfaceNotFound traceback. We can reduce
this traceback to the main one avoiding the index error exception.
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/neutron/privileged/agent/linux/ip_lib.py", line 246, in get_link_id
return ip.link_lookup(ifname=device)[0]
IndexError: list index out of range
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/oslo_privsep/daemon.py", line 449, in _process_cmd
ret = func(*f_args, **f_kwargs)
File "/usr/lib/python3.6/site-packages/neutron/privileged/agent/linux/ip_lib.py", line 53, in sync_inner
return input_func(*args, **kwargs)
File "/usr/lib/python3.6/site-packages/oslo_privsep/priv_context.py", line 247, in _wrap
return func(*args, **kwargs)
File "/usr/lib/python3.6/site-packages/neutron/privileged/agent/linux/ip_lib.py", line 406, in get_link_attributes
link = _run_iproute_link("get", device, namespace)[0]
File "/usr/lib/python3.6/site-packages/neutron/privileged/agent/linux/ip_lib.py", line 254, in _run_iproute_link
idx = get_link_id(device, namespace)
File "/usr/lib/python3.6/site-packages/neutron/privileged/agent/linux/ip_lib.py", line 248, in get_link_id
raise NetworkInterfaceNotFound(device=device, namespace=namespace)
neutron.privileged.agent.linux.ip_lib.NetworkInterfaceNotFound: Network interface tap46dac0f2-cb not found in namespace qdhcp-8c9e6c68-86ef-4bb0-b3fa-9a36a71d0ccb.
** 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/1849449
Title:
get_link_id() traceback in case of non-existing interface is
misleading
Status in neutron:
New
Bug description:
When privileged.agent.linux.ip_lib.get_link_id() method does not find
the interface, the traceback thrown is misleading: first the index
error is logged and then NetworkInterfaceNotFound traceback. We can
reduce this traceback to the main one avoiding the index error
exception.
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/neutron/privileged/agent/linux/ip_lib.py", line 246, in get_link_id
return ip.link_lookup(ifname=device)[0]
IndexError: list index out of range
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/oslo_privsep/daemon.py", line 449, in _process_cmd
ret = func(*f_args, **f_kwargs)
File "/usr/lib/python3.6/site-packages/neutron/privileged/agent/linux/ip_lib.py", line 53, in sync_inner
return input_func(*args, **kwargs)
File "/usr/lib/python3.6/site-packages/oslo_privsep/priv_context.py", line 247, in _wrap
return func(*args, **kwargs)
File "/usr/lib/python3.6/site-packages/neutron/privileged/agent/linux/ip_lib.py", line 406, in get_link_attributes
link = _run_iproute_link("get", device, namespace)[0]
File "/usr/lib/python3.6/site-packages/neutron/privileged/agent/linux/ip_lib.py", line 254, in _run_iproute_link
idx = get_link_id(device, namespace)
File "/usr/lib/python3.6/site-packages/neutron/privileged/agent/linux/ip_lib.py", line 248, in get_link_id
raise NetworkInterfaceNotFound(device=device, namespace=namespace)
neutron.privileged.agent.linux.ip_lib.NetworkInterfaceNotFound: Network interface tap46dac0f2-cb not found in namespace qdhcp-8c9e6c68-86ef-4bb0-b3fa-9a36a71d0ccb.
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1849449/+subscriptions
Follow ups