2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-06-18 12:20:40 +00:00

add test case for issue 3414 : incorrect petitboot configuration for nodeset shell in flat hierarchical #3480

This commit is contained in:
junxiawang
2017-07-27 08:49:13 -04:00
parent fe04623b23
commit 55699e81c4

View File

@ -30,3 +30,19 @@ cmd:perl /opt/xcat/share/xcat/tools/autotest/testcase/genesis/genesistest.pl -n
check:rc==0
cmd:cat /tmp/genesistestlog/*
end
start:nodeset_shell_incorrectmasterip
description:very if computenode need to do nodeset shell in different net with master will success
cmd:chdef testnode arch=ppc64le cons=ipmi groups=all ip=60.1.1.1 netboot=petitboot
cmd:masterip=`lsdef -t site -i master -c 2>&1 | awk -F'=' '{print \$2}'`;echo $masterip;masternet=`ifconfig |awk "BEGIN{RS=\"\"}/\<$masterip\>/{print \$1}"|head -n 1 | awk -F ":" '{print \$1}'`;echo $masternet;net2=` netstat -i |grep -v Kernel|grep -v Iface |grep -v lo|grep -v $masternet|head -n 1|awk '{print \$1}'`;echo $net2;net2ip=`ifconfig $net2 |grep inet|grep -v inet6`;ifconfig $net2 60.3.3.3 ;makenetworks;makehosts;nodeset testnode shell;cat /tftpboot/petitboot/testnode |grep "xcatd=60.3.3.3:3001 destiny=shell";if [[ $? -eq 0 ]] ;then if [[ -z $net2ip ]];then ifconfig $net2 0.0.0.0;exit 0;else ifconfig $net2 $net2ip;exit 0;fi ;else exit 1;fi
check:rc==0
cmd:chdef testnode arch=x86_64 netboot=xnba
cmd:masterip=`lsdef -t site -i master -c 2>&1 | awk -F'=' '{print \$2}'`;echo $masterip;masternet=`ifconfig |awk "BEGIN{RS=\"\"}/\<$masterip\>/{print \$1}"|head -n 1 | awk -F ":" '{print \$1}'`;echo $masternet;net2=` netstat -i |grep -v Kernel|grep -v Iface |grep -v lo|grep -v $masternet|head -n 1|awk '{print \$1}'`;echo $net2;net2ip=`ifconfig $net2 |grep inet|grep -v inet6`;ifconfig $net2 60.3.3.3 ;makenetworks;makehosts;nodeset testnode shell;cat /tftpboot/xcat/xnba/nodes/testnode |grep "xcatd=60.3.3.3:3001 destiny=shell";if [[ $? -eq 0 ]] ;then if [[ -z $net2ip ]];then ifconfig $net2 0.0.0.0;exit 0;else ifconfig $net2 $net2ip;exit 0;fi ;else exit 1;fi
check:rc==0
cmd:chdef testnode arch=x86_64 netboot=grub2
cmd:masterip=`lsdef -t site -i master -c 2>&1 | awk -F'=' '{print \$2}'`;echo $masterip;masternet=`ifconfig |awk "BEGIN{RS=\"\"}/\<$masterip\>/{print \$1}"|head -n 1 | awk -F ":" '{print \$1}'`;echo $masternet;net2=` netstat -i |grep -v Kernel|grep -v Iface |grep -v lo|grep -v $masternet|head -n 1|awk '{print \$1}'`;echo $net2;net2ip=`ifconfig $net2 |grep inet|grep -v inet6`;ifconfig $net2 60.3.3.3 ;makenetworks;makehosts;nodeset testnode shell; cat /tftpboot/boot/grub2/testnode |grep "xcatd=60.3.3.3:3001 destiny=shell";if [[ $? -eq 0 ]] ;then if [[ -z $net2ip ]];then ifconfig $net2 0.0.0.0;exit 0;else ifconfig $net2 $net2ip;exit 0;fi ;else exit 1;fi
check:rc==0
cmd:makehosts -d testnode
cmd:rmdef testnode
cmd:rmdef -t network 60_0_0_0-255_0_0_0
end