vyos@144458bf8eaa# commit
[ 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):
- Contact us using the online help desk if you have a subscription:
https://support.vyos.io/
- Make sure you are running the latest version of VyOS available at:
https://vyos.net/get/
- Consult the community forum to see how to handle this issue:
https://forum.vyos.io
- Join us 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: 2023-02-15 12:09:05
Image version: VyOS 1.4-rolling-202302140528
Release train: current
Built by: root@7da07c5629df
Built on: Tue 14 Feb 2023 05:28 UTC
Build UUID: 07ea3d5d-e24d-4c44-88e8-393be72f8c3c
Build commit ID: 82f35fd4744004
Architecture: x86_64
Boot via: installed image
System type: VMware guest
Hardware vendor: VMware, Inc.
Hardware model: VMware Virtual Platform
Hardware S/N: VMware-56 4d 71 15 32 e5 94 8a-dc 5c 08 3b 83 4a f5 f2
Hardware UUID: 15714D56-E532-8A94-DC5C-083B834AF5F2
Traceback (most recent call last):
File "/usr/libexec/vyos/conf_mode/interfaces-ethernet.py", line 218, in <module>
verify(c)
File "/usr/libexec/vyos/conf_mode/interfaces-ethernet.py", line 82, in verify
verify_mtu(ethernet)
File "/usr/lib/python3/dist-packages/vyos/configverify.py", line 39, in verify_mtu
min_mtu = tmp.get_min_mtu()
File "/usr/lib/python3/dist-packages/vyos/ifconfig/interface.py", line 406, in get_min_mtu
return int(self.get_interface('min_mtu'))
TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'
[[interfaces ethernet eth0]] failed
show interfaces ethernet eth0 physical
sudo ip -d link show dev eth0
vyos@vyos# show interfaces ethernet eth0 physical
Configuration path: interfaces ethernet eth0 [physical] is not valid
Show failed
[edit]
vyos@vyos# sudo ip -d link show dev eth0
34: eth0@if35: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default
link/ether 02:42:0a:08:08:8a brd ff:ff:ff:ff:ff:ff link-netnsid 0 promiscuity 0
veth addrgenmode none numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535
[edit]
Sorry, I executed these commands in the wrong place.
vyos@vyos:~$ show interfaces ethernet eth0 physical
Cannot get wake-on-lan settings: Operation not permitted
Settings for eth0:
Supported ports: [ ]
Supported link modes: Not reported
Supported pause frame use: No
Supports auto-negotiation: No
Supported FEC modes: Not reported
Advertised link modes: Not reported
Advertised pause frame use: No
Advertised auto-negotiation: No
Advertised FEC modes: Not reported
Speed: 10000Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 0
Transceiver: internal
Auto-negotiation: off
MDI-X: Unknown
Link detected: yes
Cannot get device ring settings: Operation not supported
Ring parameters for eth0:
driver: veth
version: 1.0
firmware-version:
expansion-rom-version:
bus-info:
supports-statistics: yes
supports-test: no
supports-eeprom-access: no
supports-register-dump: no
supports-priv-flags: no
vyos@vyos:~$ sudo ip -d link show dev eth0
34: eth0@if35: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default
link/ether 02:42:0a:08:08:8a brd ff:ff:ff:ff:ff:ff link-netnsid 0 promiscuity 0
veth addrgenmode none numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535
vyos@vyos:~$ sudo python3
Python 3.9.2 (default, Feb 28 2021, 17:03:44)
[GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from vyos.ifconfig import Interface
>>> Interface('eth0').get_min_mtu()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3/dist-packages/vyos/ifconfig/interface.py", line 406, in get_min_mtu
return int(self.get_interface('min_mtu'))
TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'
>>> Interface('eth0').get_mtu()
1500
>>> Interface('eth0').get_max_mtu()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3/dist-packages/vyos/ifconfig/interface.py", line 417, in get_max_mtu
return int(self.get_interface('max_mtu'))
TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'
>>> quit()
@gameboy-aa Could you check these changes? sudo nano -c +28 /usr/lib/python3/dist-packages/vyos/configverify.py
Delete function verrify_mtu
And add a new
def verify_mtu(config):
"""
Common helper function used by interface implementations to perform
recurring validation if the specified MTU can be used by the underlaying
hardware.
"""
from vyos.ifconfig import Interface
if 'mtu' in config:
mtu = int(config['mtu'])
tmp = Interface(config['ifname'])
# Not all interfaces support min/max MTU
# https://vyos.dev/T5011
try:
min_mtu = tmp.get_min_mtu()
max_mtu = tmp.get_max_mtu()
except: # Fallback to defaults
min_mtu = 68
max_mtu = 65536
if mtu < min_mtu:
raise ConfigError(f'Interface MTU too low, ' \
f'minimum supported MTU is {min_mtu}!')
if mtu > max_mtu:
raise ConfigError(f'Interface MTU too high, ' \
f'maximum supported MTU is {max_mtu}!')
“Ctrl-x” to exit and “Y” to save file
After this restart vyos-configd sudo systemctl restart vyos-configd