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

Version
vyos-1.3-beta-202109050342
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.Sep 10 2021, 2:21 PM
c-po claimed this task.
c-po triaged this task as Urgent! priority.
c-po edited a custom field.
c-po edited a custom field.
c-po changed Is it a breaking change? from Unspecified (possibly destroys the router) to Stricter validation.