Page MenuHomeVyOS Platform

Commit fails if ethernet interface doesn't support flow control
Closed, ResolvedPublicBUG

Description

After this commit, the interface was no longer configurable.

https://github.com/vyos/vyos-1x/commit/b0d4112bd6073e4a947869c3bd80f8e87783fbfa

If the interface does not support flow control,

 # ethtool --show-pause eth0
Pause parameters for eth0:
Cannot get device pause settings: Operation not supported

the commit will always fail.

Traceback (most recent call last):
  File "/usr/libexec/vyos/conf_mode/interfaces-ethernet.py", line 164, in <module>
    apply(c)
  File "/usr/libexec/vyos/conf_mode/interfaces-ethernet.py", line 153, in apply
    e.update(ethernet)
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/ethernet.py", line 328, in update
    self.set_flow_control(value)
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/ethernet.py", line 125, in set_flow_control
    current = self.ethtool.get_flow_control()
  File "/usr/lib/python3/dist-packages/vyos/ethtool.py", line 208, in get_flow_control
    raise ValueError('Interface does not support changing '\
ValueError: Interface does not support changing flow-control settings!

noteworthy:
cmd 'ethtool --show-pause eth0'
returned (out):
Pause parameters for eth0:
returned (err):
Cannot get device pause 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 --show-pause eth0'
returned (out):
Pause parameters for eth0:
returned (err):
Cannot get device pause settings: Operation not supported

[[interfaces ethernet eth0]] failed
Commit failed

We have confirmed this symptom with the following USB NICs.

  • R8152
  • Ax88179_178a

Details

Difficulty level
Easy (less than an hour)
Version
vyos-1.3-beta-202109050342
Why the issue appeared?
Design mistake
Is it a breaking change?
Stricter validation
Issue type
Bug (incorrect behavior)

Event Timeline

c-po changed the task status from Open to In progress.Fri, Sep 10, 2:21 PM
c-po claimed this task.
c-po triaged this task as Unbreak Now! priority.
c-po changed Difficulty level from Unknown (require assessment) to Easy (less than an hour).
c-po changed Why the issue appeared? from Will be filled on close to Design mistake.
c-po changed Is it a breaking change? from Unspecified (possibly destroys the router) to Stricter validation.