Project

General

Profile

Actions

Bug #37712

open

VLAN detection on non bonding interfaces wrong

Added by Ludwig Bayerlein 4 months ago. Updated 4 months ago.

Status:
Ready For Testing
Priority:
Normal
Assignee:
-
Category:
Templates
Target version:
-
Difficulty:
easy
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

Hi,

we have detected small missconfigurations on provisioning EL9 distributions.

After provisioning EL9 (in our case RedHat 9.4), the network setup is wrong. We are using vlans and add on the host one interface (unmanaged) with its name (f. e. eno6) and add an additional interface with the vlan tag (eno6.10 - managed, virtual interface). The root cause is the interface name / identifier name detection in 'kickstart_networking_setup.rb' snippet.

The preview looks like this:

/etc/sysconfig/network-scripts/ifcfg-$sanitized_real
BOOTPROTO="none" 
IPADDR="192.168.1.5" 
NETMASK="255.255.255.0" 
GATEWAY="192.168.1.1" 
DOMAIN="linux.infra" 
DEVICE=$real
ONBOOT=yes
PEERDNS=yes
PEERROUTES=yes
DEFROUTE=yes
DNS1="192.168.1.2" 
VLAN=yes
MTU=1500
EOF-b6b17c26

The problem is, that $real is "eno6.10.10" instead of "eno6.10". This happens in kickstart_ifcfg_get_identifier_names

<%=     "real=`grep -l #{@interface.inheriting_mac} /sys/class/net/*/{bonding_slave/perm_hwaddr,address} 2>/dev/null | awk -F '/' '// {print $5}' | head -1`" -%>

If I run this manually on the server, this is the output:

eno6.10

So if I changed the line to not only query bonding interfaces, the lookup works. I think, thats not a perfect solution, but it I tried ;)

Thanks

Actions #1

Updated by The Foreman Bot 4 months ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/10264 added
Actions

Also available in: Atom PDF