diff --git a/xCAT-test/autotest/linux.conf.template b/xCAT-test/autotest/linux.conf.template index 44002883f..05db9de2a 100644 --- a/xCAT-test/autotest/linux.conf.template +++ b/xCAT-test/autotest/linux.conf.template @@ -58,7 +58,7 @@ os=rhels5.4 #system varible for autotest [System] -MN=rhmn +MN=rhmn SN=rhsn CN=lpar5 #It can be used in flat environment CNWITHSN=lpar6 #It can be used in hierarchy environment for cn @@ -146,3 +146,11 @@ NODEIP=10.4.27.10 #genesis testcase imgip=10.4.27.10 #imgip should be same with MN's ip genesis case only for ppc64le and x86_64 +#For HA +VIP=10.3.17.233 +PRIMARYMN=lpar5 +PMNSECONDNIC=eth1 +STANDBYMN=lpar6 +SMNSECONDNIC=eth1 +HACN=lpar7 +HASCIPRTURL=https://raw.githubusercontent.com/xcat2/xcat-extensions/master/HA/xcatha.py diff --git a/xCAT-test/autotest/testcase/HA/case0 b/xCAT-test/autotest/testcase/HA/case0 index caa46641f..28618f211 100644 --- a/xCAT-test/autotest/testcase/HA/case0 +++ b/xCAT-test/autotest/testcase/HA/case0 @@ -29,7 +29,8 @@ cmd:if [[ -f /install/postscripts/check_node_state ]] ;then mv -f /install/posts cmd:cp -f /opt/xcat/share/xcat/tools/autotest/testcase/HA/cfghamn /install/postscripts/ cmd:cp -f /opt/xcat/share/xcat/tools/autotest/testcase/HA/check_node_state /install/postscripts/ cmd:if [[ -f /install/postscripts/xcatha.py ]] ;then mv -f /install/postscripts/xcatha.py /install/postscripts/xcatha.py.bak;fi; -cmd:if [[ ! -f /install/postscripts/xcatha.py ]] ;then wget $$HASCIPRTURL -P /install/postscripts/; fi; +cmd:wget -O - $$HASCIPRTURL > /install/postscripts/xcatha.py +check:rc==0 cmd:ls /install/postscripts/xcatha.py check:rc==0 cmd:genimage __GETNODEATTR($$PRIMARYMN,os)__-__GETNODEATTR($$PRIMARYMN,arch)__-netboot-compute @@ -111,8 +112,9 @@ cmd:xdsh $$PRIMARYMN "chmod 755 /xcatpost/check_node_state" cmd:xdsh $$PRIMARYMN "/xcatpost/check_node_state $$HACN" cmd:xdsh $$PRIMARYMN "lsdef $$HACN -i status" check:output=~booted +cmd:xdsh $$PRIMARYMN "xdsh $$HACN date" check:rc==0 - + #deactivate the first HA node cmd:updatenode $$PRIMARYMN -P "cfghamn -l $$MN:/install/autotestHA -i $$VIP -x d" check:rc==0