Comment 6 for bug 1904730

Revision history for this message
MichaƂ Ajduk (majduk) wrote :

It seems that there is a problem when numvfs > 32, lib.get_link_vfs fails do decode the output of listing the interfaces.

Reproduce:
cat << EOF > test.py
from neutron.privileged.agent.linux import ip_lib
ip_lib.get_link_vfs('ens3f0', None)
EOF

python3 test.py

This works fine with 32 VFs, but fails with 64:
root@cmp4az1cz20300kvs:~# python3 test.py
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pyroute2/netlink/__init__.py", line 1311, in _ft_decode_generic
    self.decode_nlas(offset)
  File "/usr/lib/python3/dist-packages/pyroute2/netlink/__init__.py", line 1436, in decode_nlas
    offset)
struct.error: unpack_from requires a buffer of at least 4 bytes

AAAA neutron.privileged.agent.linux.ip_lib.get_link_vfs ('ens3f0', None) {} (5, 'builtins.TypeError', ("Cannot serialize error('unpack_from requires a buffer of at least 4 bytes',)",))
Traceback (most recent call last):
  File "test.py", line 2, in <module>
    ip_lib.get_link_vfs('ens3f0', None)
  File "/usr/lib/python3/dist-packages/oslo_privsep/priv_context.py", line 247, in _wrap
    return self.channel.remote_call(name, args, kwargs)
  File "/usr/lib/python3/dist-packages/oslo_privsep/daemon.py", line 205, in remote_call
    raise exc_type(*result[2])
TypeError: Cannot serialize error('unpack_from requires a buffer of at least 4 bytes',)