Skip to content

Fix coriolis alias udev rule - #552

Merged
Dany9966 merged 1 commit into
cloudbase:mainfrom
fabi200123:refactor-udev
Oct 26, 2026
Merged

Dany9966 merged 1 commit into
cloudbase:mainfrom
fabi200123:refactor-udev

Conversation

@fabi200123

Copy link
Copy Markdown
Contributor

This PR refactors the method that defined the udev rule so that aliases (eth0:ABC) are skipped in favor of parent devices (eth0).

Comment thread coriolis/osmorphing/base.py Outdated
break
if ip_addresses and nic_ips:
if set(ip_addresses) & set(nic_ips):
# ens192:SAB is an address label. The udev NAME has to

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NIT: Let's keep these comments generalized. ens192:SAB is a specific scenario that is being handled here. What we're really handling here are filtering out address labels.

if set(ip_addresses) & set(nic_ips):
# ens192:SAB is an address label. The udev NAME has to
# be the parent device, which has no ':' in its name.
if ":" in iface:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do other network renderers/managers handle the creation or management of these address labels? Is : used for netplan or nmconnections for example? Do we need different handlers?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The : form is a legacy address label and the kernel treats eth0:0 as an alias of eth0: it is not a real netdev, so a udev NAME has to be the parent device.

An ifcfg alias file is like this: ifcfg-<if>:<label> with DEVICE=eth0:0, and NetworkManager stores that as a label on the master interface.

netplan and NetworkManager don't have this format:

  • Netplan lists extra addresses under the real interface id
  • NetworkManager binds the profile with connection.interface-name and adds further addresses as address1, address2, and so on...

@Dany9966
Dany9966 merged commit 0efb139 into cloudbase:main Oct 26, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants