Page MenuHomeVyOS Platform

vyos 1.3 beta fails to configure Xen HVM guest ethernet interfaces due to ethtool -g error
Resolved (N/A)Public

Description

fresh vyos 1.3 beta instance installed from vyos-1.3-beta-202102220443-amd64.iso, as a Xen HVM guest.

configure
set interfaces ethernet eth0 address 192.168.1.0/24
commit

or

configure
set interfaces ethernet eth0 address dhcp
commit

.. both result in an error like this:

[ 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 stable version of VyOS
  the code is available at https://downloads.vyos.io/?dir=release/current
- Contact us using the online help desk
  https://support.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:      2021-02-22 18:57:51
Image Version:    VyOS 1.3-beta-202102220443
Release Train:    equuleus

Built by:         autobuild@vyos.net
Built on:         Mon 22 Feb 2021 04:43 UTC
Build UUID:       6b8d42c3-efc5-4b34-925e-30bb8edd4262
Build Commit ID:  f4be339392a75b

Architecture:     x86_64
Boot via:         installed image
System type:      Xen HVM guest

Hardware vendor:  Xen
Hardware model:   HVM domU
Hardware S/N:     97826e4f-bd93-42b1-8602-aad21d637ad3
Hardware UUID:    97826e4f-bd93-42b1-8602-aad21d637ad3

Traceback (most recent call last):
  File "/usr/libexec/vyos/conf_mode/interfaces-ethernet.py", line 150, in <module>
    verify(c)
  File "/usr/libexec/vyos/conf_mode/interfaces-ethernet.py", line 91, in verify
    ethtool = Ethtool(ifname)
  File "/usr/lib/python3/dist-packages/vyos/ethtool.py", line 53, in __init__
    tmp = cmd(f'ethtool -g {ifname}')
  File "/usr/lib/python3/dist-packages/vyos/util.py", line 179, in cmd
    raise OSError(code, feedback)
OSError: [Errno 76] failed to run command: ethtool -g eth0
returned: Ring parameters for eth0:
exit code: 76

noteworthy:
cmd 'ethtool -g eth0'
returned (out):
Ring parameters for eth0:
returned (err):
Cannot get device ring settings: Operation not supported

[[interfaces ethernet eth0]] failed
Commit failed

and indeed.. the following does not seem to work:

$ sudo ethtool -g eth0
Ring parameters for eth0:
Cannot get device ring settings: Operation not supported

eth0 is a xen-netfront ethernet interface in a Xen HVM guest:

$ sudo ethtool -i eth0
driver: vif
version: 
firmware-version: 
expansion-rom-version: 
bus-info: vif-0
supports-statistics: yes
supports-test: no
supports-eeprom-access: no
supports-register-dump: no
supports-priv-flags: no

Details

Difficulty level
Unknown (require assessment)
Version
vyos-1.3-beta-202102220443-amd64.iso
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Unspecified (please specify)

Event Timeline

pasik created this object in space S1 VyOS Public.
pasik updated the task description. (Show Details)

If I disable Xen PV drivers using "xen_platform_pci=0" from the host/dom0 side, and thus I get emulated e1000 NICs in the Xen HVM guest, then setting address to ethernet interfaces works ok..

$ sudo ethtool -i eth0
driver: e1000
version: 7.3.21-k8-NAPI
firmware-version: 
expansion-rom-version: 
bus-info: 0000:00:03.0
supports-statistics: yes
supports-test: yes
supports-eeprom-access: yes
supports-register-dump: yes
supports-priv-flags: no

$ sudo ethtool -g eth0
Ring parameters for eth0:
Pre-set maximums:
RX:             4096
RX Mini:        0
RX Jumbo:       0
TX:             4096
Current hardware settings:
RX:             256
RX Mini:        0
RX Jumbo:       0
TX:             256

so yeah, for some reason "ethtool -g" does not work with the xen_netfront PV driver, and thus vyos ethernet interface configuration currently breaks due to that..

It seems the same problem (lack of "ethtool -g" support) happens also with "veth" interfaces.. ref T2516

This should have been fixed in the latest 1.3 beta - please try again

@c-po confirmed, works OK in vyos-1.3-beta-202102250443-amd64.iso. Thanks a lot!

SrividyaA changed the task status from Resolved to Resolved N/A.Aug 31 2021, 12:54 PM
SrividyaA set Issue type to Unspecified (please specify).