Last active
June 5, 2021 08:30
-
-
Save moss2k13/8e6272cbe7748b2c5210fab291360e0b to your computer and use it in GitHub Desktop.
/usr/lib/python3.6/site-packages/neutron/agent/linux/ip_lib.py error from ip_lib.privileged.get_link_vfs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### working victoria environment: | |
>>> ip_lib.privileged.get_link_vfs('pt0', '') | |
{0: {'mac': '00:00:00:00:00:00', 'link_state': 0}, 1: {'mac': '00:00:00:00:00:00', 'link_state': 0}, 2: {'mac': '00:00:00:00:00:00', 'link_state': 0}, 3: {'mac': '00:00:00:00:00:00', 'link_state': 0}, 4: {'mac': '00:00:00:00:00:00', 'link_state': 0}, 5: {'mac': '00:00:00:00:00:00', 'link_state': 0}, 6: {'mac': '00:00:00:00:00:00', 'link_state': 0}, 7: {'mac': 'b6:ff:ef:5d:5f:e2', 'link_state': 0}} | |
>>> ip_lib.privileged.get_link_vfs('pt1', '') | |
{0: {'mac': '00:00:00:00:00:00', 'link_state': 0}, 1: {'mac': '00:00:00:00:00:00', 'link_state': 0}, 2: {'mac': '00:00:00:00:00:00', 'link_state': 0}, 3: {'mac': '00:00:00:00:00:00', 'link_state': 0}, 4: {'mac': '00:00:00:00:00:00', 'link_state': 0}, 5: {'mac': '00:00:00:00:00:00', 'link_state': 0}, 6: {'mac': '00:00:00:00:00:00', 'link_state': 0}, 7: {'mac': '00:00:00:00:00:00', 'link_state': 0}} | |
### broken victoria environment: | |
## 63 VFs configured and enabled: | |
cat /sys/class/net/ens2f1/device/sriov_totalvfs | |
63 | |
ip link show ens2f1 | wc -l | |
65 | |
>>> ip_lib.privileged.get_link_vfs('ens2f0', '') | |
Traceback (most recent call last): | |
File "/usr/lib/python3.6/site-packages/pyroute2/netlink/__init__.py", line 1345, in _ft_decode_generic | |
self.decode_nlas(offset) | |
File "/usr/lib/python3.6/site-packages/pyroute2/netlink/__init__.py", line 1470, in decode_nlas | |
offset) | |
struct.error: unpack_from requires a buffer of at least 4 bytes | |
Traceback (most recent call last): | |
File "<stdin>", line 1, in <module> | |
File "/usr/lib/python3.6/site-packages/oslo_privsep/priv_context.py", line 247, in _wrap | |
return self.channel.remote_call(name, args, kwargs) | |
File "/usr/lib/python3.6/site-packages/oslo_privsep/daemon.py", line 224, in remote_call | |
raise exc_type(*result[2]) | |
TypeError: can not serialize 'error' object | |
### what is interesting, i don't see this error for other non sriov interfaces so prbly this is not pyroute2 related: | |
>>> ip_lib.privileged.get_link_vfs('eno3', '') | |
{} | |
### update 20210602 | |
### after commenting out line 441 there is another exception: | |
### https://github.com/openstack/neutron/blob/stable/victoria/neutron/privileged/agent/linux/ip_lib.py#L441 | |
>>> ip_lib.privileged.get_link_vfs('ens2f0', '') | |
Traceback (most recent call last): | |
File "/usr/lib/python3.6/site-packages/pyroute2/netlink/__init__.py", line 1345, in _ft_decode_generic | |
self.decode_nlas(offset) | |
File "/usr/lib/python3.6/site-packages/pyroute2/netlink/__init__.py", line 1470, in decode_nlas | |
offset) | |
struct.error: unpack_from requires a buffer of at least 4 bytes | |
Traceback (most recent call last): | |
File "/usr/lib/python3.6/site-packages/pyroute2/netlink/__init__.py", line 1345, in _ft_decode_generic | |
self.decode_nlas(offset) | |
File "/usr/lib/python3.6/site-packages/pyroute2/netlink/__init__.py", line 1470, in decode_nlas | |
offset) | |
struct.error: unpack_from requires a buffer of at least 4 bytes | |
During handling of the above exception, another exception occurred: | |
Traceback (most recent call last): | |
File "<stdin>", line 1, in <module> | |
File "/usr/lib/python3.6/site-packages/neutron/privileged/agent/linux/ip_lib.py", line 443, in get_link_vfs | |
link = _run_iproute_link('get', device, namespace=namespace, ext_mask=1)[0] | |
File "/usr/lib/python3.6/site-packages/neutron/privileged/agent/linux/ip_lib.py", line 263, in _run_iproute_link | |
return ip.link(command, index=idx, **kwargs) | |
File "/usr/lib/python3.6/site-packages/pyroute2/iproute/linux.py", line 1350, in link | |
msg_flags=msg_flags) | |
File "/usr/lib/python3.6/site-packages/pyroute2/netlink/nlsocket.py", line 376, in nlm_request | |
return tuple(self._genlm_request(*argv, **kwarg)) | |
File "/usr/lib/python3.6/site-packages/pyroute2/netlink/nlsocket.py", line 869, in nlm_request | |
callback=callback): | |
File "/usr/lib/python3.6/site-packages/pyroute2/netlink/nlsocket.py", line 379, in get | |
return tuple(self._genlm_get(*argv, **kwarg)) | |
File "/usr/lib/python3.6/site-packages/pyroute2/netlink/nlsocket.py", line 704, in get | |
raise msg['header']['error'] | |
File "/usr/lib/python3.6/site-packages/pyroute2/netlink/nlsocket.py", line 177, in parse | |
msg.decode() | |
File "/usr/lib/python3.6/site-packages/pyroute2/netlink/rtnl/ifinfmsg/__init__.py", line 1092, in decode | |
nlmsg.decode(self) | |
File "/usr/lib/python3.6/site-packages/pyroute2/netlink/__init__.py", line 1016, in decode | |
self._ft_decode(self, offset) | |
File "/usr/lib/python3.6/site-packages/pyroute2/netlink/__init__.py", line 1348, in _ft_decode_generic | |
raise NetlinkNLADecodeError(e) | |
pyroute2.netlink.exceptions.NetlinkNLADecodeError: unpack_from requires a buffer of at least 4 bytes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
pyroute2 bug: svinota/pyroute2#751