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

vyos_net_name: T5603: rework the helper not to use biosdevname #3821

Draft
wants to merge 1 commit into
base: current
Choose a base branch
from

Conversation

dmbaturin
Copy link
Member

Change Summary

Since it's always supposed to be called with an explicit interface name argument, there is no reason to use that legacy code that was called without the --allow-vm argument anyway and thus would never work in VMs.

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)

Related PR(s)

Component(s) name

vyos_net_name udev helper.

Proposed changes

I removed the option to call on_boot_event without an explicit predefined name and added a RuntimeError (which may not be a perfect exception choice...) when the script is called without correct arguments.

Also took a chance to rework debug messages and remove a bunch of extra whitespace.

How to test

Smoketest result

Interface names after boot should be the same as intended in the config.

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

since it's always supposed to be called
with an explicit interface name argument
Copy link

👍
No issues in PR Title / Commit Title

Copy link

👍
No issues in unused-imports

Copy link

CI integration ❌ failed!

Details

CI logs

  • CLI Smoketests ❌ failed
  • Config tests 👍 passed
  • RAID1 tests 👍 passed

@c-po
Copy link
Member

c-po commented Jul 18, 2024

This PR breaks the ISO massively. After the PR no ethernet interface is present anymore.
They are all stuck with their temporary non-renamed name.

vyos@vyos:~$ show interfaces
Codes: S - State, L - Link, u - Up, D - Down, A - Admin Down
Interface    IP Address    MAC                VRF        MTU  S/L    Description
-----------  ------------  -----------------  -------  -----  -----  -------------
lo           127.0.0.1/8   00:00:00:00:00:00  default  65536  u/u
             ::1/128
vyos@vyos:~$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 fe80::200:ff:fe00:0/64 scope link
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host noprefixroute
       valid_lft forever preferred_lft forever
2: e2: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 52:54:00:00:00:00 brd ff:ff:ff:ff:ff:ff
    altname enp0s3
    altname ens3
3: e3: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 52:54:00:00:00:01 brd ff:ff:ff:ff:ff:ff
    altname enp0s4
    altname ens4
4: e4: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 52:54:00:00:00:02 brd ff:ff:ff:ff:ff:ff
    altname enp0s5
    altname ens5
5: e5: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 52:54:00:00:00:03 brd ff:ff:ff:ff:ff:ff
    altname enp0s6
    altname ens6
6: e6: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 52:54:00:00:00:04 brd ff:ff:ff:ff:ff:ff
    altname enp0s7
    altname ens7
7: e7: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 52:54:00:00:00:05 brd ff:ff:ff:ff:ff:ff
    altname enp0s8
    altname ens8
8: e8: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 52:54:00:00:00:06 brd ff:ff:ff:ff:ff:ff
    altname enp0s9
    altname ens9
9: e9: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 52:54:00:00:00:07 brd ff:ff:ff:ff:ff:ff
    altname enp0s10
    altname ens10

@sever-sever
Copy link
Member

Any updates ?

@sever-sever sever-sever added the stale PR has become inactive or needs attention label Sep 4, 2024
@github-actions github-actions bot added the rebase label Sep 4, 2024
@dmbaturin dmbaturin marked this pull request as draft September 11, 2024 11:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
current rebase stale PR has become inactive or needs attention
Development

Successfully merging this pull request may close these issues.

3 participants