[WIP]PVM-681: shorten non-FIPS NIC names on fresh bare-metal installs#623
Open
abhinavnagaraj wants to merge 5 commits into
Open
[WIP]PVM-681: shorten non-FIPS NIC names on fresh bare-metal installs#623abhinavnagaraj wants to merge 5 commits into
abhinavnagaraj wants to merge 5 commits into
Conversation
Non-FIPS HWE kernels append np* physical-port suffixes (e.g. enp153s0f0np0), which breaks VLAN sub-interfaces under Linux's 15-char limit. Install udev hwdb rules and pin net.naming-scheme=v252 for non-FIPS Ubuntu builds only; FIPS images are unchanged. Co-authored-by: Cursor <cursoragent@cursor.com>
bf434af to
fc8520b
Compare
hwdb ID_NET_NAME_ALLOW_* and net.naming-scheme=v252 do not suppress phys_port_name suffixes on Ubuntu 22.04. Use a late udev rule instead. Co-authored-by: Cursor <cursoragent@cursor.com>
Move net-naming into overlay/files and install from base-image for every supported distribution and image type (ISO, UKI, cloud/agent AWS, MAAS). VMware and AWS ens* names pass through unchanged. Co-authored-by: Cursor <cursoragent@cursor.com>
Legacy production nodes keep long interface names across day-2 provider upgrades. Fresh installs write /oem/.canvos-strip-np-enabled during after-install so new bare-metal nodes get VLAN-safe short names. Co-authored-by: Cursor <cursoragent@cursor.com>
Document that /etc/canvos/strip-np-enabled is an initramfs/early-boot fallback and may not persist after install; /oem/.canvos-strip-np-enabled is the durable install marker on deployed nodes. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Non-FIPS HWE kernels (6.8+) expose
phys_port_name, so systemd on Ubuntu 22.04 (249) appends annp*suffix to predictable interface names (e.g.enp153s0f0np0,eno12399np0). That pushes names past Linux’s 15-character limit and breaks VLAN sub-interfaces in Stylus.This PR adds a late udev rule that strips trailing
np[0-9]+from predictable names. It is install-only: a marker file is written to/oemduring fresh ISO/UKI install (cloudconfigs/80_canvos_net_naming.yaml). Legacy nodes without the marker keep their existing long names across day-2 provider upgrades.Approach
overlay/files/usr/lib/canvos/canvos-strip-np-suffix— helper invoked by udev; stripsnp*only when the install marker is presentoverlay/files/etc/udev/rules.d/99-canvos-net-naming.rules— runs after80-net-setup-linkcloudconfigs/80_canvos_net_naming.yaml— creates/oem/.canvos-strip-np-enabledand/etc/canvos/strip-np-enabledon fresh installEarthfile— installs the above for all supported non-FIPS OS targets; regenerates initrd after udev rules are in placeFIPS builds are unchanged (
FIPS_ENABLED=truegate).Deployment coverage
enp153s0f0)ens*)np*suffix — pass-throughens*)np*suffix — pass-throughTest plan
ip linkshows names withoutnp*(e.g.enp153s0f0)/oem/.canvos-strip-np-enabledexists after install.100on a multi-port NIC — combined name ≤ 15 charseno12399np0*np*after rebootens*names unchanged