When vyos is loading on a system that does not have XDP installed it will fail loading and give a horrible error message to the user:
Traceback (most recent call last):
File "/usr/libexec/vyos/vyos-boot-config-loader.py", line 143, in <module>
commit_out = session.commit()
File "/usr/lib/python3/dist-packages/vyos/configsession.py", line 164, in commit
out = self.__run_command([COMMIT])
File "/usr/lib/python3/dist-packages/vyos/configsession.py", line 136, in __run_command
raise ConfigSessionError(output)
vyos.configsession.ConfigSessionError: [ interfaces loopback lo ]
VyOS had an issue completing a command.
We are sorry that you encountered a problem while using VyOS.
There are a few things you can do to help us (and yourself):
- Make sure you are running the latest version of the code available at
https://downloads.vyos.io/rolling/current/amd64/vyos-rolling-latest.iso
- Consult the forum to see how to handle this issue
https://forum.vyos.io
- Join our community on slack where our users exchange help and advice
https://vyos.slack.com
When reporting problems, please include as much information as possible:
- do not obfuscate any data (feel free to contact us privately if your
business policy requires it)
- and include all the information presented below
Report Time: 2019-02-14 10:12:56
Image Version: VyOS 1.4-rolling-202103160721
Release Train: sagitta
Built by: anshi@ems.uk
Built on: Tue 16 Mar 2021 07:21 UTC
Build UUID: f3fdb8f4-5c67-4411-af75-a134a9d94ede
Build Commit ID: e758a269e84509-dirty
Architecture: aarch64
Boot via: installed image
System type: bare metal
Hardware vendor:
Hardware model:
Hardware S/N: 100000000077598c
Hardware UUID: 30303031-3030-3030-3030-373735393863
Traceback (most recent call last):
File "/usr/libexec/vyos/conf_mode/interfaces-loopback.py", line 61, in <module>
apply(c)
File "/usr/libexec/vyos/conf_mode/interfaces-loopback.py", line 52, in apply
l.update(loopback)
File "/usr/lib/python3/dist-packages/vyos/ifconfig/loopback.py", line 68, in update
super().update(config)
File "/usr/lib/python3/dist-packages/vyos/ifconfig/interface.py", line 1240, in update
self.set_xdp('xdp' in config)
File "/usr/lib/python3/dist-packages/vyos/ifconfig/interface.py", line 1064, in set_xdp
return self._cmd(cmd)
File "/usr/lib/python3/dist-packages/vyos/ifconfig/control.py", line 51, in _cmd
return cmd(command, self.debug)
File "/usr/lib/python3/dist-packages/vyos/util.py", line 179, in cmd
raise OSError(code, feedback)
OSError: [Errno 127] failed to run command: xdp_loader -d lo -U --auto-mode
returned:
exit code: 127
noteworthy:
cmd 'xdp_loader -d lo -U --auto-mode'
returned (out):
returned (err):
/bin/sh: xdp_loader: command not found
[[interfaces loopback lo]] failed
[ interfaces ethernet eth0 ]
VyOS had an issue completing a command.
We are sorry that you encountered a problem while using VyOS.
There are a few things you can do to help us (and yourself):
- Make sure you are running the latest version of the code available at
https://downloads.vyos.io/rolling/current/amd64/vyos-rolling-latest.iso
- Consult the forum to see how to handle this issue
https://forum.vyos.io
- Join our community on slack where our users exchange help and advice
https://vyos.slack.com
When reporting problems, please include as much information as possible:
- do not obfuscate any data (feel free to contact us privately if your
business policy requires it)
- and include all the information presented below
Report Time: 2019-02-14 10:12:59
Image Version: VyOS 1.4-rolling-202103160721
Release Train: sagitta
Built by: anshi@ems.uk
Built on: Tue 16 Mar 2021 07:21 UTC
Build UUID: f3fdb8f4-5c67-4411-af75-a134a9d94ede
Build Commit ID: e758a269e84509-dirty
Architecture: aarch64
Boot via: installed image
System type: bare metal
Hardware vendor:
Hardware model:
Hardware S/N: 100000000077598c
Hardware UUID: 30303031-3030-3030-3030-373735393863
Traceback (most recent call last):
File "/usr/libexec/vyos/conf_mode/interfaces-ethernet.py", line 157, in <module>
apply(c)
File "/usr/libexec/vyos/conf_mode/interfaces-ethernet.py", line 146, in apply
e.update(ethernet)
File "/usr/lib/python3/dist-packages/vyos/ifconfig/ethernet.py", line 355, in update
super().update(config)
File "/usr/lib/python3/dist-packages/vyos/ifconfig/interface.py", line 1240, in update
self.set_xdp('xdp' in config)
File "/usr/lib/python3/dist-packages/vyos/ifconfig/interface.py", line 1064, in set_xdp
return self._cmd(cmd)
File "/usr/lib/python3/dist-packages/vyos/ifconfig/control.py", line 51, in _cmd
return cmd(command, self.debug)
File "/usr/lib/python3/dist-packages/vyos/util.py", line 179, in cmd
raise OSError(code, feedback)
OSError: [Errno 127] failed to run command: xdp_loader -d eth0 -U --auto-mode
returned:
exit code: 127
noteworthy:
cmd 'ethtool -g eth0'
returned (out):
Ring parameters for eth0:
returned (err):
Cannot get device ring settings: Operation not supported
cmd 'ethtool --show-pause eth0'
returned (out):
Pause parameters for eth0:
returned (err):
Cannot get device pause settings: Operation not supported
cmd 'ethtool -K eth0 tso off'
returned (out):
returned (err):
Cannot change tcp-segmentation-offload
cmd 'ethtool -K eth0 ufo off'
returned (out):
returned (err):
Cannot change udp-fragmentation-offload
cmd 'ethtool eth0'
returned (out):
Settings for eth0:
Supports Wake-on: gsf
Wake-on: d
SecureOn password: 00:00:00:00:00:00
Current message level: 0x00000007 (7)
drv probe link
Link detected: no
returned (err):
Cannot get device settings: Invalid argument
cmd 'ethtool -s eth0 autoneg on'
returned (out):
returned (err):
Cannot get current device settings: Invalid argument
not setting autoneg
cmd 'xdp_loader -d eth0 -U --auto-mode'
returned (out):
returned (err):
/bin/sh: xdp_loader: command not found
[[interfaces ethernet eth0]] failed
Commit failedThere is a hotfix for fixing this issue:
diff --git a/python/vyos/ifconfig/interface.py b/python/vyos/ifconfig/interface.py index fe6a3c95..be26694c 100644 --- a/python/vyos/ifconfig/interface.py +++ b/python/vyos/ifconfig/interface.py @@ -1048,6 +1048,8 @@ class Interface(Control): >>> i = Interface('eth0') >>> i.set_xdp(True) """ + if not os.path.exists('/usr/sbin/xdp_loader'): + return if not isinstance(state, bool): raise ValueError("Value out of range")
This fix works for fixing the imminent issue , but a more correct way for fixing this should be implemented..
This is an issue on arm platforms where XDP is not easily built as for now.