mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-05-31 01:56:39 +00:00
Clean up some errors in bmcsetup script
- update some log messages - do not run the mc reset cold for openPower systems - create the 'mc info' output in a file in /tmp to reduce the number of ipmitool calls - 300 is too large for chassis identify, change to 275
This commit is contained in:
parent
41b755a413
commit
3d2605c2f2
@ -37,12 +37,13 @@ function cold_reset_bmc() {
|
||||
# reset after applying ipmitool commands. However, it seems there is a problem with
|
||||
# the BMC where after 15 seconds, it stops responding. To work around, sleep 30
|
||||
# seconds before issuing the reset of the BMC.
|
||||
sleep 30
|
||||
snooze
|
||||
else
|
||||
logger -s -t $log_label -p local4.info "Resetting BMC ..."
|
||||
ipmitool mc reset cold
|
||||
logger -s -t $log_label -p local4.info "Waiting for the BMC to appear ..."
|
||||
fi
|
||||
logger -s -t $log_label -p local4.info "Resetting BMC ..."
|
||||
ipmitool mc reset cold
|
||||
|
||||
logger -s -t $log_label -p local4.info "Waiting for the BMC to appear ..."
|
||||
if [ "$XPROD" = "43707" ]; then
|
||||
# OpenPower SPECIFIC, check the BMC with the following raw command to
|
||||
# make sure that the bmc is really in a "ready" state before continuing
|
||||
@ -125,18 +126,22 @@ while [ -z "$BMCIP" -a $IPCFGMETHOD="static" ]; do
|
||||
done
|
||||
kill $CREDPID
|
||||
NUMBMCS=`grep bmcip /tmp/ipmicfg.xml |awk -F\> '{print $2}'|awk -F\< '{print $1}'|wc -l`
|
||||
logger -s -t $log_label -p local4.debug "BMC IP=$BMCIP, NETMASK=$BMCNM, GATEWAY=$BMCGW, VLAN=$BMCVLAN, USER=$BMCUS, PASSWORD=$BMCPW"
|
||||
logger -s -t $log_label -p local4.info "NUMBMCS=$NUMBMCS"
|
||||
logger -s -t $log_label -p local4.debug "BMC Information obtained from xCAT"
|
||||
logger -s -t $log_label -p local4.debug "NUMBMCS=$NUMBMCS ==> BMC IP=$BMCIP/$BMCNM, GW=$BMCGW, VLAN=$BMCVLAN, USER=$BMCUS, PASSWORD=$BMCPW"
|
||||
|
||||
#
|
||||
# Get the BMC Version and Manufacturer ID
|
||||
#
|
||||
IPMIVER=`ipmitool mc info|grep ^IPMI|awk '{print $4}'`
|
||||
IPMIMFG=`ipmitool mc info|grep "^Manufacturer ID"|awk '{print $4}'`
|
||||
logger -s -t $log_label -p local4.info "IPMIVER=$IPMIVER, IPMIMFG=$IPMIMFG"
|
||||
MC_INFO=/tmp/xcat.ipmitool.mcinfo
|
||||
|
||||
ipmitool mc info > ${MC_INFO}
|
||||
IPMIVER=`cat ${MC_INFO} |grep ^IPMI|awk '{print $4}'`
|
||||
IPMIMFG=`cat ${MC_INFO} |grep "^Manufacturer ID"|awk '{print $4}'`
|
||||
|
||||
# Get the BMC Product ID
|
||||
XPROD=`ipmitool mc info|grep "^Product ID"|awk '{print $4}'`
|
||||
logger -s -t $log_label -p local4.info "XPROD=$XPROD"
|
||||
XPROD=`cat ${MC_INFO} |grep "^Product ID"|awk '{print $4}'`
|
||||
|
||||
logger -s -t $log_label -p local4.info "IPMIVER=$IPMIVER, IPMIMFG=$IPMIMFG, XPROD=$XPROD"
|
||||
|
||||
#
|
||||
# IPMIMFG=2 = IBM
|
||||
@ -474,7 +479,7 @@ while [ $idev -gt 0 ]; do
|
||||
done
|
||||
if [ $TRIES -gt $TIMEOUT ]; then logger -s -t $log_label -p local4.err "$MSG: ERROR"; else logger -s -t $log_label -p local4.info "$MSG: OK"; fi
|
||||
|
||||
MSG="Enabling IPMI v 1.5 MD5 LAN access"
|
||||
MSG="Enabling IPMI MD5 LAN access"
|
||||
logger -s -t $log_label -p local4.info "$MSG"
|
||||
TRIES=0
|
||||
# Set the auth level to md5 for the channel
|
||||
@ -517,6 +522,8 @@ while [ $idev -gt 0 ]; do
|
||||
i=$((i+1))
|
||||
done
|
||||
|
||||
logger -s -t $log_label -p local4.info "ACCESS=$NEWACCESS"
|
||||
|
||||
MSG="Set the cipher_privileges for the channel"
|
||||
logger -s -t $log_label -p local4.info "$MSG"
|
||||
# Set the cipher_privileges for the channel
|
||||
@ -565,8 +572,12 @@ while [ $idev -gt 0 ]; do
|
||||
|
||||
logger -s -t $log_label -p local4.info "Lighting Identify Light"
|
||||
if [ "$XPROD" = "43707" ]; then
|
||||
# OpenPower BMC specific, turn on the LED beacon for 5 minutes
|
||||
ipmitool chassis identify 300
|
||||
# OpenPower BMC specific, turn on the LED beacon light.
|
||||
# - default interval, # ipmitool chassis identify
|
||||
# Chassis identify interval: default (15 seconds)
|
||||
# - 275 is too large, # ipmitool chassis identify 275
|
||||
# Given interval is too big.
|
||||
ipmitool chassis identify 250
|
||||
else
|
||||
# All other BMCs
|
||||
while :
|
||||
|
Loading…
x
Reference in New Issue
Block a user