2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2026-10-21 23:28:19 +00:00

fix(postscripts/configib): turn autoconnect on when reusing a connection

On EL9+ with NetworkManager, configib modifies an existing connection for
the InfiniBand interface instead of adding one. On a diskful EL10 install
that connection is the one anaconda created for the unconfigured NIC, with
connection.autoconnect=false, so the IPoIB address works on the first boot
(configib activates it) but is gone after the next reboot. Set
connection.autoconnect yes in the modify paths, as nmcli con add already
does by default.

Seen on Rocky Linux 10.2, xCAT stateful, ConnectX-6 (OpenHPC install recipe).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Timothy Middelkoop <tmiddelkoop@internet2.edu>
This commit is contained in:
Timothy Middelkoop
2026-10-12 19:58:54 -05:00
parent 495bb36db9
commit b7be1b3715
+4 -4
View File
@@ -491,10 +491,10 @@ IPADDR_$ipindex=$nicip" >> $dir/ifcfg-$nic
# ipv6
if echo $nicip | grep : 2>&1 1>/dev/null
then
nmcli con modify $nic type infiniband con-name $nic ifname $nic ipv6.method manual ipv6.addresses $nicip
nmcli con modify $nic type infiniband con-name $nic ifname $nic connection.autoconnect yes ipv6.method manual ipv6.addresses $nicip
else # ipv4
prefix=$(convert_netmask_to_cidr $netmask)
nmcli con modify $nic type infiniband con-name $nic ifname $nic ipv4.method manual ipv4.addresses $nicip/$prefix
nmcli con modify $nic type infiniband con-name $nic ifname $nic connection.autoconnect yes ipv4.method manual ipv4.addresses $nicip/$prefix
fi
else # create new connection
# ipv6
@@ -570,10 +570,10 @@ IPADDR=$nicip" > $dir/ifcfg-$nic
# ipv6
if echo $nicip | grep : 2>&1 1>/dev/null
then
nmcli con modify $nic type infiniband con-name $nic ifname $nic ipv6.method manual ipv6.addresses $nicip
nmcli con modify $nic type infiniband con-name $nic ifname $nic connection.autoconnect yes ipv6.method manual ipv6.addresses $nicip
else # ipv4
prefix=$(convert_netmask_to_cidr $netmask)
nmcli con modify $nic type infiniband con-name $nic ifname $nic ipv4.method manual ipv4.addresses $nicip/$prefix
nmcli con modify $nic type infiniband con-name $nic ifname $nic connection.autoconnect yes ipv4.method manual ipv4.addresses $nicip/$prefix
fi
else # create new connection
# ipv6