2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-22 03:32:04 +00:00

enhance bmcsetup for WSP:1. use raw to untag vlan, 2. enable ipsrc static, 3. open set access on and don't check the return code

This commit is contained in:
ertaozh 2017-09-01 04:13:01 -04:00
parent 9cb9a8d4d5
commit 40f3b88c1e

View File

@ -293,9 +293,6 @@ logger -s -t $log_label -p local4.info "Detected LAN channel $LANCHAN"
let idev=NUMBMCS
if [ $IPCFGMETHOD="static" ]; then
if [ ! -z "$ISOPENBMC" ]; then
let idev=0
fi
while [ $idev -gt 0 ]; do
let idev=idev-1
TRIES=0
@ -370,6 +367,17 @@ else
done
fi
if [ "$BMCVLAN" = off ]; then
TRIES=0
logger -s -t $log_label -p local4.info "Untagging BMC vlan..."
while ! ipmitool raw 0xc 1 $LANCHAN 0x14 0 0; do
snooze
let TRIES=TRIES+1
if [ $TRIES -gt $TIMEOUT ]; then
break;
fi
done
else
let idev=0
for b in $BMCVLAN; do
TRIES=0
@ -383,7 +391,7 @@ for b in $BMCVLAN; do
done
let idev=idev+1
done
fi
# update the node status to 'bmcready' for openbmc, no more configuration is needed.
@ -393,14 +401,15 @@ if [ ! -z "$ISOPENBMC" ]; then
bmc_config_rc=0
# Set Channel Access to apply network setting
#while ! ipmitool -d 0 lan set $LANCHAN access on; do
while ! ipmitool -d 0 raw 0x06 0x40 $LANCHAN 0x42 0x44 > /dev/null; do
snooze
let TRIES=TRIES+1
if [ $TRIES -gt $TIMEOUT ]; then
bmc_config_rc=1
break;
fi
done
ipmitool -d 0 lan set $LANCHAN access on
#while ! ipmitool -d 0 raw 0x06 0x40 $LANCHAN 0x42 0x44 > /dev/null; do
# snooze
# let TRIES=TRIES+1
# if [ $TRIES -gt $TIMEOUT ]; then
# bmc_config_rc=1
# break;
# fi
#done
# update the node status to 'bmcready'
if [ ! -z "$XCATMASTER" ]; then