vyos_net_name: T5603: rework the helper not to use biosdevname
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)
- [x] 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:
- [x] I have read the CONTRIBUTING document
- [x] I have linked this PR to one or more Phabricator Task(s)
- [ ] I have run the components SMOKETESTS if applicable
- [x] My commit headlines contain a valid Task id
- [ ] My change requires a change to the documentation
- [ ] I have updated the documentation accordingly
👍 No issues in PR Title / Commit Title
👍 No issues in unused-imports
CI integration ❌ failed!
Details
- CLI Smoketests ❌ failed
- Config tests 👍 passed
- RAID1 tests 👍 passed
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
Any updates ?
This PR is stale because it has been open 30 days with no activity. The PR will be reviewed by a maintainer and may be closed
Can we close it?
I'm closing this for now, until I or someone else finds a way to debug the breakage it causes. biosdevname is not a huge maintenance overhead so getting rid of it is not an urgent issue.