From cb75d9c8ba3a8afff51d8f6109c5d8ce0c084ab1 Mon Sep 17 00:00:00 2001 From: Wai Yee Wong Date: Mon, 8 May 2023 12:17:37 -0400 Subject: [PATCH] More changes to nodeset_disjointdhcps_petitboot, nodeset_grub2, nodeset_petitboot --- xCAT-test/autotest/testcase/nodeset/cases0 | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/xCAT-test/autotest/testcase/nodeset/cases0 b/xCAT-test/autotest/testcase/nodeset/cases0 index d0e916b1d..558654a25 100644 --- a/xCAT-test/autotest/testcase/nodeset/cases0 +++ b/xCAT-test/autotest/testcase/nodeset/cases0 @@ -237,11 +237,11 @@ start:nodeset_grub2 description: Verify when grub2 is used for OS loader, whether the configuration files under /tftpboot can be generated corrently label:others cmd:lsdef testnode1 > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef testnode1 -z >/tmp/testnode1.stanza ;rmdef testnode1;fi -cmd:rm -f /tftpboot/boot/grub2/{testnode1,grub.cfg-{01-e6-d4-d2-3a-ad-06,0[aA]0101[cC]8}} -cmd:mkdef -t node -o testnode1 arch=ppc64 cons=hmc groups=lpar ip=10.1.1.200 mac=e6:d4:d2:3a:ad:06 mgt=hmc profile=compute os=rhels7.99 +cmd:temp=`lsdef $$SN | grep ip= | cut -d '=' -f2 | cut -d '.' -f1`;first_octet=`printf "%02x" $temp`;first_octet="${first_octet^^}";temp=`lsdef $$SN | grep ip= | cut -d '=' -f2 | cut -d '.' -f2`;second_octet=`printf "%02x" $temp`;second_octet="${second_octet^^}";rm -f /tftpboot/boot/grub2/grub.cfg-{01-e6-d4-d2-3a-ad-06,${first_octet}${second_octet}01C8} +cmd:first_two_octets=`lsdef $$SN | grep ip= | cut -d '=' -f2 | cut -d '.' -f1-2`;mkdef -t node -o testnode1 arch=ppc64le cons=bmc groups=ipmi ip=$first_two_octets".1.200" mac=e6:d4:d2:3a:ad:06 mgt=ipmi profile=compute os=rhels7.99 check:rc==0 cmd:cp -f /etc/hosts /etc/hosts.xcattestbak -cmd:echo "10.1.1.200 testnode1" >> /etc/hosts +cmd:first_two_octets=`lsdef $$SN | grep ip= | cut -d '=' -f2 | cut -d '.' -f1-2`;echo $first_two_octets".1.200" testnode1 >> /etc/hosts cmd:makedns -n check:rc==0 cmd:chdef testnode1 netboot=grub2 addkcmdline=debug @@ -256,7 +256,7 @@ cmd:grep "debug" /tftpboot/boot/grub2/testnode1 check:rc==0 cmd:grep "debug" /tftpboot/boot/grub2/grub.cfg-01-e6-d4-d2-3a-ad-06 check:rc==0 -cmd:grep "debug" /tftpboot/boot/grub2/grub.cfg-0[aA]0101[cC]8 +cmd:temp=`lsdef $$SN | grep ip= | cut -d '=' -f2 | cut -d '.' -f1`;first_octet=`printf "%02x" $temp`;first_octet="${first_octet^^}";temp=`lsdef $$SN | grep ip= | cut -d '=' -f2 | cut -d '.' -f2`;second_octet=`printf "%02x" $temp`;second_octet="${second_octet^^}";grep "debug" /tftpboot/boot/grub2/grub.cfg-${first_octet}${second_octet}01C8 check:rc==0 #cmd:makedhcp -q testnode1 | grep ^testnode1: #check:rc==0 @@ -285,11 +285,11 @@ description: Verify when petitboot is used for OS loader, whether the configurat label:others cmd:lsdef testnode1 > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef testnode1 -z >/tmp/testnode1.stanza ;rmdef testnode1;fi cmd:rm -f /tftpboot/petitboot/testnode1 -cmd:mkdef -t node -o testnode1 arch=ppc64le cons=bmc groups=ipmi ip=10.1.1.200 mac=e6:d4:d2:3a:ad:06 mgt=ipmi profile=compute os=rhels7.99 +cmd:first_two_octets=`lsdef $$SN | grep ip= | cut -d '=' -f2 | cut -d '.' -f1-2`;mkdef -t node -o testnode1 arch=ppc64le cons=bmc groups=ipmi ip=$first_two_octets".1.200" mac=e6:d4:d2:3a:ad:06 mgt=ipmi profile=compute os=rhels7.99 check:rc==0 cmd:cp -f /etc/hosts /etc/hosts.bak cmd:cp -f /etc/hosts /etc/hosts.xcattestbak -cmd:echo "10.1.1.200 testnode1" >> /etc/hosts +cmd:first_two_octets=`lsdef $$SN | grep ip= | cut -d '=' -f2 | cut -d '.' -f1-2`;echo $first_two_octets".1.200" testnode1 >> /etc/hosts cmd:makedns -n check:rc==0 cmd:chdef testnode1 netboot=petitboot addkcmdline=debug @@ -384,10 +384,10 @@ description: Verify the disjointdhcps feature when petitboot is used for OS load label:others cmd:lsdef testnode1 > /dev/null 2>&1;if [[ $? -eq 0 ]]; then lsdef testnode1 -z >/tmp/testnode1.stanza ;rmdef testnode1;fi cmd:rm -f /tftpboot/petitboot/testnode1 -cmd:first_two_octets=`xdsh $$SN ip route | grep src | awk '{print $10}'| cut -d '.' -f1-2`;mkdef -t node -o testnode1 arch=ppc64le cons=bmc groups=ipmi ip=$first_two_octets".1.200" mac=e6:d4:d2:3a:ad:06 mgt=ipmi profile=compute os=rhels7.99;lsdef testnode1 +cmd:first_two_octets=`lsdef $$SN | grep ip= | cut -d '=' -f2 | cut -d '.' -f1-2`;mkdef -t node -o testnode1 arch=ppc64le cons=bmc groups=ipmi ip=$first_two_octets".1.200" mac=e6:d4:d2:3a:ad:06 mgt=ipmi profile=compute os=rhels7.99 check:rc==0 cmd:cp -f /etc/hosts /etc/hosts.xcattestbak -cmd:first_two_octets=`xdsh $$SN ip route | grep src | awk '{print $10}'| cut -d '.' -f1-2`;echo $first_two_octets".1.200" testnode1 >> /etc/hosts +cmd:first_two_octets=`lsdef $$SN | grep ip= | cut -d '=' -f2 | cut -d '.' -f1-2`;echo $first_two_octets".1.200" testnode1 >> /etc/hosts cmd:makedns -n check:rc==0 cmd:chdef testnode1 netboot=petitboot addkcmdline=debug