Skip to content

Commit

Permalink
bmcsetup: revert previous meaning of bmcport for Dell servers (#7317)
Browse files Browse the repository at this point in the history
* 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
ipmitool/ipmitool#18).

So removing thatdependency and using raw IPMI commands seems more robust.
  • Loading branch information
kcgthb authored Jul 12, 2024
1 parent 9da2038 commit 255ff27
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions xCAT-genesis-scripts/usr/bin/bmcsetup
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 255ff27

Please sign in to comment.