Verified for bionic-ussuri using the test script in comment #33
ubuntu@node-lepaute:~$ dpkg -l | grep pyroute2
ii python3-pyroute2 0.5.9-0ubuntu1~cloud0 all Python3 Netlink library
ubuntu@node-lepaute:~$ echo 63 | sudo tee /sys/class/net/enp3s0f0/device/sriov_numvfs
63
ubuntu@node-lepaute:~$ ./test-lp1904730.sh
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
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "./test-lp1904730.sh", line 7, in <module>
link = ip.link('get', index=link_idx, ext_mask=1)[0]
File "/usr/lib/python3/dist-packages/pyroute2/iproute/linux.py", line 1332, in link
msg_flags=msg_flags)
File "/usr/lib/python3/dist-packages/pyroute2/netlink/nlsocket.py", line 373, in nlm_request
return tuple(self._genlm_request(*argv, **kwarg))
File "/usr/lib/python3/dist-packages/pyroute2/netlink/nlsocket.py", line 864, in nlm_request
callback=callback):
File "/usr/lib/python3/dist-packages/pyroute2/netlink/nlsocket.py", line 376, in get
return tuple(self._genlm_get(*argv, **kwarg))
File "/usr/lib/python3/dist-packages/pyroute2/netlink/nlsocket.py", line 701, in get
raise msg['header']['error']
File "/usr/lib/python3/dist-packages/pyroute2/netlink/nlsocket.py", line 177, in parse
msg.decode()
File "/usr/lib/python3/dist-packages/pyroute2/netlink/rtnl/ifinfmsg/__init__.py", line 1087, in decode
nlmsg.decode(self)
File "/usr/lib/python3/dist-packages/pyroute2/netlink/__init__.py", line 982, in decode
self._ft_decode(self, offset)
File "/usr/lib/python3/dist-packages/pyroute2/netlink/__init__.py", line 1314, in _ft_decode_generic
raise NetlinkNLADecodeError(e)
pyroute2.netlink.exceptions.NetlinkNLADecodeError: unpack_from requires a buffer of at least 4 bytes
ubuntu@node-lepaute:~$ sudo add-apt-repository cloud-archive:ussuri-proposed
Ubuntu Cloud Archive for OpenStack Ussuri [proposed]
More info: https://wiki.ubuntu.com/OpenStack/CloudArchive
Press [ENTER] to continue or Ctrl-c to cancel adding it.
...
ubuntu@node-lepaute:~$ sudo apt-get upgrade python3-pyroute2
...
ubuntu@node-lepaute:~$ dpkg -l | grep pyroute2
ii python3-pyroute2 0.5.9-0ubuntu2~cloud0 all Python3 Netlink library
ubuntu@node-lepaute:~$ ./test-lp1904730.sh
63
Verified for bionic-ussuri using the test script in comment #33
ubuntu@ node-lepaute: ~$ dpkg -l | grep pyroute2 cloud0 all Python3 Netlink library node-lepaute: ~$ echo 63 | sudo tee /sys/class/ net/enp3s0f0/ device/ sriov_numvfs node-lepaute: ~$ ./test-lp1904730.sh python3/ dist-packages/ pyroute2/ netlink/ __init_ _.py", line 1311, in _ft_decode_generic decode_ nlas(offset) python3/ dist-packages/ pyroute2/ netlink/ __init_ _.py", line 1436, in decode_nlas
ii python3-pyroute2 0.5.9-0ubuntu1~
ubuntu@
63
ubuntu@
Traceback (most recent call last):
File "/usr/lib/
self.
File "/usr/lib/
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): lp1904730. sh", line 7, in <module> python3/ dist-packages/ pyroute2/ iproute/ linux.py" , line 1332, in link flags=msg_ flags) python3/ dist-packages/ pyroute2/ netlink/ nlsocket. py", line 373, in nlm_request _genlm_ request( *argv, **kwarg)) python3/ dist-packages/ pyroute2/ netlink/ nlsocket. py", line 864, in nlm_request callback) : python3/ dist-packages/ pyroute2/ netlink/ nlsocket. py", line 376, in get _genlm_ get(*argv, **kwarg)) python3/ dist-packages/ pyroute2/ netlink/ nlsocket. py", line 701, in get ]['error' ] python3/ dist-packages/ pyroute2/ netlink/ nlsocket. py", line 177, in parse python3/ dist-packages/ pyroute2/ netlink/ rtnl/ifinfmsg/ __init_ _.py", line 1087, in decode decode( self) python3/ dist-packages/ pyroute2/ netlink/ __init_ _.py", line 982, in decode _ft_decode( self, offset) python3/ dist-packages/ pyroute2/ netlink/ __init_ _.py", line 1314, in _ft_decode_generic eError( e) netlink. exceptions. NetlinkNLADecod eError: unpack_from requires a buffer of at least 4 bytes node-lepaute: ~$ sudo add-apt-repository cloud-archive: ussuri- proposed /wiki.ubuntu. com/OpenStack/ CloudArchive node-lepaute: ~$ sudo apt-get upgrade python3-pyroute2 node-lepaute: ~$ dpkg -l | grep pyroute2 cloud0 all Python3 Netlink library node-lepaute: ~$ ./test-lp1904730.sh
File "./test-
link = ip.link('get', index=link_idx, ext_mask=1)[0]
File "/usr/lib/
msg_
File "/usr/lib/
return tuple(self.
File "/usr/lib/
callback=
File "/usr/lib/
return tuple(self.
File "/usr/lib/
raise msg['header'
File "/usr/lib/
msg.decode()
File "/usr/lib/
nlmsg.
File "/usr/lib/
self.
File "/usr/lib/
raise NetlinkNLADecod
pyroute2.
ubuntu@
Ubuntu Cloud Archive for OpenStack Ussuri [proposed]
More info: https:/
Press [ENTER] to continue or Ctrl-c to cancel adding it.
...
ubuntu@
...
ubuntu@
ii python3-pyroute2 0.5.9-0ubuntu2~
ubuntu@
63