2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-21 11:12:04 +00:00

bmcsetup: revert previous meaning of bmcport for Dell servers (#7317)

* bmcsetup: revert previous meaning of bmcport for Dell servers, to
conform with other server types: 0=shared, 1=dedicated

* bmcsetup: remove dependency on `ipmitool delloem` and use raw cmds instead

ipmitool delloem may not work on all Dell server generations,
functionnality depends on ipmitool versions (see
https://github.com/ipmitool/ipmitool/issues/18).

So removing thatdependency and using raw IPMI commands seems more robust.
This commit is contained in:
Kilian Cavalotti 2024-07-12 07:05:54 -07:00 committed by GitHub
parent 9da20387d7
commit 255ff27d8f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -265,12 +265,14 @@ elif [ "$IPMIMFG" == "47488" ]; then
elif [ "$IPMIMFG" == "674" ]; then # DELL
BMCPORT=`grep bmcport /tmp/ipmicfg.xml |awk -F\> '{print $2}'|awk -F\< '{print $1}'`
logger -s -t $log_label -p local4.info "BMCPORT is $BMCPORT"
if [ "$BMCPORT" == "0" ]; then # dedicated
ipmitool delloem lan set dedicated &>/dev/null
elif [ "$BMCPORT" == "1" -o "$BMCPORT" == "2" -o "$BMCPORT" == "3" -o "$BMCPORT" == "4" ]; then # shared
ipmitool delloem lan set shared &>/dev/null
ipmitool delloem lan set shared with lom$BMCPORT &>/dev/null
ipmitool delloem lan set shared with failover all loms &>/dev/null
if [ "$BMCPORT" == "0" ]; then # shared
# https://github.com/ipmitool/ipmitool/issues/18
# ipmitool raw 0x30 0x28 0xAA 0xBB, with:
# AA: 01 = dedicated, 02...05 = shared with lom1...4
# BB: 00 = no failover, 02...05 = failover on lom1...4, , 06 = failover on all loms
ipmitool raw 0x30 0x28 0x02 0x06
elif [ "$BMCPORT" == "1" ]; then # dedicated
ipmitool raw 0x30 0x28 0x01 0x00
fi
elif [ "$IPMIMFG" == "42817" -a "$XPROD" == "16975" ]; then # IBM OpenPOWER servers with OpenBMC (AC922)
ISOPENBMC=1