xcat2 / xcat-core

Code repo for xCAT core packages
Eclipse Public License 1.0
356 stars 170 forks source link

Use 'nmcli con modify' for nicextraparams on RHEL9 #7444

Closed alexrichert closed 1 week ago

alexrichert commented 1 month ago

The PR is to address issue #7416

The modification include

The UT result

##The UT output##

alexrichert commented 3 weeks ago

@Obihoernchen to be clear, when you say similar logic, do you mean using nmcli calls instead of the ifcfg files?

landcaster commented 3 days ago

Not sure if this is the appropriate place to report this and if this is specific to our site, but this merge breaks infiniband configuration on our Rocky 9 cluster.

The error response we got in the script logs for configib is: "nmcli Error: unknown connection"

Digging into this, the IB looks to never have been connected via "nmcli con add " before calls to "nmcli con modify" are made.

I modified the configib script after Line 491 to make the following call instead of trying to write an ifcfg-$nic file.

elif [ $OS_name == 'redhat' ]
 then
   # First ip address
   if [ $ipindex -eq 1 ]
     ###
     if [[ "$OSVER" =~ (rhels9|alma9|rocky9) ]]; then
       prefix=$(convert_netmask_to_cidr $netmask)
       nmcli con add type infiniband con-name $nic ifname $nic ipv4.method manual  ipv4.addresses  $nicip/$prefix connection.autoconnect-priority 9
     else 
       ...
     fi
   ....

I can possibly work on creating a pull request to address this, but it might take me awhile as I am a bit short on free time. As far as how to approach the problem, it is not clear to me if copying the configipv4 and configipv6 function in the configeth script with the appropriate changes would be a good approach to take as I would assume those functions have had extensive work already done to cover many of the cases one would encounter with xcat.

Obihoernchen commented 3 days ago

Thank you for your report. I'll take a look at it.