Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

T2516: Exclude veth interfaces from duplex and speed check #1886

Merged
merged 1 commit into from
Mar 13, 2023

Conversation

sever-sever
Copy link
Member

Change Summary

Exclude interfaces with veth driver from duplex and speed check

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes)
  • Migration from an old Vyatta component to vyos-1x, please link to related PR inside obsoleted component
  • Other (please describe):

Related Task(s)

Component(s) name

veth, duplex

Proposed changes

How to test

Deploy VyOS in container and attach veth interface to container
Change any ethernet settings
Before fix

vyos@91800359325b# compare 
[interfaces ethernet eth0]
- description "fof"
+ description "WAN"

[edit]
vyos@91800359325b# 
[edit]
vyos@91800359325b# commit
[ interfaces ethernet eth0 ]
sudo: unable to resolve host 91800359325b: System error
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-03-13 13:30:14
Image version:    VyOS 1.4-rolling-202303120743
Release train:    current

Built by:         autobuild@vyos.net
Built on:         Sun 12 Mar 2023 07:43 UTC
Build UUID:       f0413059-7c5d-4744-a466-367e167102a2
Build commit ID:  fdc0441a77f010

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

Hardware vendor:  QEMU
Hardware model:   Standard PC (Q35 + ICH9, 2009)
Hardware S/N:     
Hardware UUID:    4d6f4d29-1ae8-446f-8d2b-3decd9da64c7

Traceback (most recent call last):
  File "/usr/libexec/vyos/conf_mode/interfaces-ethernet.py", line 220, in <module>
    apply(c)
  File "/usr/libexec/vyos/conf_mode/interfaces-ethernet.py", line 209, in apply
    e.update(ethernet)
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/ethernet.py", line 374, in update
    self.set_speed_duplex(speed, duplex)
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/ethernet.py", line 172, in set_speed_duplex
    return self._cmd(cmd)
           ^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/control.py", line 52, in _cmd
    return cmd(command, self.debug)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/vyos/util.py", line 161, in cmd
    raise OSError(code, feedback)
OSError: [Errno 75] failed to run command: ethtool --change eth0 autoneg on
returned: 
exit code: 75

noteworthy:
cmd 'ethtool --show-ring eth0'
returned (out):

returned (err):
netlink error: Operation not supported
cmd 'ethtool --show-pause eth0'
returned (out):

returned (err):
netlink error: Operation not supported
cmd 'ethtool --show-ring eth0'
returned (out):

returned (err):
netlink error: Operation not supported
cmd 'ethtool --show-pause eth0'
returned (out):

returned (err):
netlink error: Operation not supported
cmd 'ethtool --change eth0 autoneg on'
returned (out):

returned (err):
netlink error: Operation not supported

[[interfaces ethernet eth0]] failed
Commit failed
[edit]
vyos@91800359325b# 

After fix:

vyos@91800359325b# set interfaces ethernet eth0 address 192.0.2.5/24
[edit]
vyos@91800359325b# commit
[ interfaces ethernet eth0 ]
sudo: unable to resolve host 91800359325b: System error

[edit]
vyos@91800359325b# run show int
Codes: S - State, L - Link, u - Up, D - Down, A - Admin Down
Interface        IP Address                        S/L  Description
---------        ----------                        ---  -----------
eth0             192.0.2.5/24                      u/u  WAN
lo               127.0.0.1/8                       u/u  
                 ::1/128                                
[edit]
vyos@91800359325b# 

Checklist:

  • I have read the CONTRIBUTING document
  • I have linked this PR to one or more Phabricator Task(s)
  • I have run the components SMOKETESTS if applicable
  • My commit headlines contain a valid Task id
  • My change requires a change to the documentation
  • I have updated the documentation accordingly

Exclude interfaces with 'veth' driver from duplex and speed check
@vyosbot vyosbot requested review from a team, dmbaturin, sarthurdev, zdc, jestabro and c-po and removed request for a team March 13, 2023 13:38
@c-po c-po merged commit c614e8c into vyos:current Mar 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants