mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-05-30 09:36:41 +00:00
add makentp/setupntp cases
This commit is contained in:
parent
10e2617436
commit
8858d38c40
@ -6,6 +6,12 @@ cmd:copycds $$ISO
|
||||
check:rc==0
|
||||
cmd:if [[ "__GETNODEATTR($$CN,os)__" =~ "ubuntu" ]];then mkdir /tmp/iso; mount -o loop $$MINIISO /tmp/iso ; mkdir -p /install/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/install/netboot; cp /tmp/iso/install/initrd.gz /install/__GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/install/netboot;umount /tmp/iso; rmdir /tmp/iso; fi
|
||||
check:rc==0
|
||||
cmd:chtab key=extntpservers site.value=""
|
||||
check:rc==0
|
||||
cmd:chtab key=ntpservers site.value="<xcatmaster>"
|
||||
check:rc==0
|
||||
cmd:makentp
|
||||
check:rc==0
|
||||
cmd:makedhcp -n
|
||||
check:rc==0
|
||||
cmd:makedhcp -a
|
||||
@ -16,6 +22,8 @@ cmd:makeconservercf $$CN
|
||||
check:rc==0
|
||||
cmd:cat /etc/conserver.cf | grep $$CN
|
||||
check:output=~$$CN
|
||||
cmd:chdef -t node -o $$CN postscripts=setupntp
|
||||
check:rc==0
|
||||
cmd:nodeset $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute
|
||||
check:rc==0
|
||||
cmd:rpower $$CN boot
|
||||
@ -29,4 +37,7 @@ check:output=~booted
|
||||
cmd:xdsh $$CN date
|
||||
check:rc==0
|
||||
check:output=~\d\d:\d\d:\d\d
|
||||
cmd:xdsh $$CN service ntpd status
|
||||
check:rc==0
|
||||
check:output=~running
|
||||
end
|
||||
|
@ -5,8 +5,6 @@ cmd:if ping -c 1 $$SN > /dev/null;then rpower $$SN off > /dev/null;fi
|
||||
|
||||
cmd:chdef -t node -o $$CN servicenode= monserver=$$MN nfsserver=$$MN tftpserver=$$MN xcatmaster=$$MN
|
||||
check:rc==0
|
||||
cmd:if [[ "__GETNODEATTR($$CN,arch)__" != "ppc64" ]]; then tabdump -w node==$$CN kvm_nodedata; fi
|
||||
check:rc==0
|
||||
cmd:if [ "__GETNODEATTR($$CN,arch)__" != "ppc64" -a "__GETNODEATTR($$CN,mgt)__" != "ipmi" ];then if [[ "__GETNODEATTR($$CN,vmstorage)__" =~ "phy" ]]; then rmvm $$CN -f -p && mkvm $$CN; else rmvm $$CN -f -p && mkvm $$CN -s 20G; fi;fi
|
||||
check:rc=0
|
||||
cmd:makedns -n
|
||||
@ -18,6 +16,12 @@ check:output=~$$CN
|
||||
cmd:sleep 20
|
||||
cmd:if [ "__GETNODEATTR($$CN,arch)__" = "ppc64" -a "__GETNODEATTR($$CN,mgt)__" != "ipmi" ]; then getmacs -D $$CN; fi
|
||||
check:rc==0
|
||||
cmd:chtab key=extntpservers site.value=""
|
||||
check:rc==0
|
||||
cmd:chtab key=ntpservers site.value="<xcatmaster>"
|
||||
check:rc==0
|
||||
cmd:makentp
|
||||
check:rc==0
|
||||
cmd:makedhcp -n
|
||||
check:rc==0
|
||||
cmd:makedhcp -a
|
||||
@ -27,6 +31,8 @@ cmd:if cat /etc/*release |grep SUSE >/dev/null;then cat /var/lib/dhcp/db/dhcpd.l
|
||||
check:output=~$$CN
|
||||
cmd:copycds $$ISO
|
||||
check:rc==0
|
||||
cmd:chdef -t node -o $$CN postscripts=setupntp
|
||||
check:rc==0
|
||||
cmd:nodeset $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute
|
||||
check:rc==0
|
||||
cmd:lsdef $$CN |grep provmethod
|
||||
@ -52,6 +58,9 @@ check:output=~\d\d:\d\d:\d\d
|
||||
cmd:xdsh $$CN mount
|
||||
check:rc==0
|
||||
cmd:sleep 120
|
||||
cmd:xdsh $$CN service ntpd status
|
||||
check:rc==0
|
||||
check:output=~running
|
||||
cmd:ping $$CN -c 3
|
||||
check:rc==0
|
||||
check:output=~64 bytes from $$CN
|
||||
|
@ -4,66 +4,99 @@ cmd:makentp -v
|
||||
check:rc==0
|
||||
check:output=~Version
|
||||
end
|
||||
|
||||
start:makentp_h
|
||||
descriptiop:makentp -h
|
||||
cmd:makentp -h
|
||||
check:rc==0
|
||||
check:output=~Usage: makentp
|
||||
end
|
||||
start:makentp_V
|
||||
descriptiop:makentp -V
|
||||
|
||||
start:makentp_extntpserver_null
|
||||
descriptiop:test makentp with default value. extntpserver is set to blank
|
||||
cmd:lsdef -t site -o clustersite -i extntpservers -c >/tmp/extntpserver
|
||||
check:rc==0
|
||||
cmd:chtab key=extntpservers site.value=""
|
||||
check:rc==0
|
||||
cmd:makentp
|
||||
check:rc==0
|
||||
check:output=~configuring management node: $$MN
|
||||
cmd:makentp -V
|
||||
check:rc==0
|
||||
check:output=~configuring management node: $$MN
|
||||
check:output=~checking if nptd is installed
|
||||
check:output=~backing up the ntp configuration file /etc/ntp.conf
|
||||
check:output=~stopping ntpserver
|
||||
check:output=~starting ntpserver
|
||||
check:output=~enabling ntpserver
|
||||
cmd:extntpserver=`cat /tmp/ntpserver | awk -F = '{print \$2}'`;chtab key=extntpservers site.value=$extntpserver
|
||||
check:rc==0
|
||||
cmd:rm -rf /tmp/extntpserver
|
||||
cmd:makentp
|
||||
check:rc==0
|
||||
end
|
||||
start:makentp
|
||||
descriptiop:makentp
|
||||
|
||||
start:makentp_extntpserver_value
|
||||
descriptiop:test makentp with extntpserver is set to a specific value
|
||||
cmd:lsdef -t site -o clustersite -i extntpservers -c >/tmp/extntpserver
|
||||
check:rc==0
|
||||
cmd:chtab key=extntpservers site.value="$$extntpserversip"
|
||||
check:rc==0
|
||||
cmd:date -s 20000101
|
||||
check:rc==0
|
||||
cmd:if [[ "__GETNODEATTR($$CN,os)__" =~ "rhel" ]];then clock -w;else hwclock -w ; fi
|
||||
cmd:chtab key=extntpservers site.value="$$extntpserversip"
|
||||
check:rc==0
|
||||
cmd:makentp
|
||||
cmd:makentp
|
||||
check:rc==0
|
||||
check:output=~configuring management node
|
||||
check:output=~configuring management node: $$MN
|
||||
cmd:makentp -V
|
||||
check:rc==0
|
||||
check:output=~configuring management node: $$MN
|
||||
check:output=~checking if nptd is installed
|
||||
check:output=~backing up the ntp configuration file /etc/ntp.conf
|
||||
check:output=~ntp servers are: $$extntpserversip
|
||||
check:output=~stopping ntpserver
|
||||
check:output=~starting ntpserver
|
||||
check:output=~enabling ntpserver
|
||||
cmd:date
|
||||
check:output=~$$DATE
|
||||
cmd:if [[ "__GETNODEATTR($$CN,os)__" =~ "rhel" ]];then clock ;else hwclock ; fi
|
||||
check:output=~$$DATE
|
||||
end
|
||||
start:makentp_a
|
||||
descriptiop:makentp -a
|
||||
cmd:date -s 20000101
|
||||
check:rc==0
|
||||
cmd:if [[ "__GETNODEATTR($$CN,os)__" =~ "rhel" ]];then clock -w;else hwclock -w ; fi
|
||||
cmd:chtab key=extntpservers site.value="$$extntpserversip"
|
||||
check:rc==0
|
||||
cmd:makentp -a
|
||||
check:rc==0
|
||||
check:output=~configuring management node
|
||||
cmd:date
|
||||
check:output=~$$DATE
|
||||
cmd:if [[ "__GETNODEATTR($$CN,os)__" =~ "rhel" ]];then clock ;else hwclock ; fi
|
||||
check:output=~$$DATE
|
||||
cmd:extntpserver=`cat /tmp/extntpserver | awk -F = '{print \$2}'`;chtab key=extntpservers site.value=$extntpserver
|
||||
check:rc==0
|
||||
cmd:rm -rf /tmp/extntpserver
|
||||
end
|
||||
|
||||
start:updatenode_computenode_P_setupntp
|
||||
descriptiop:using updatenode -p synch
|
||||
descriptiop:using updatenode -P to setup ntp on compute node
|
||||
cmd:xdsh $$CN date -s 20000101
|
||||
check:rc==0
|
||||
cmd:if [[ "__GETNODEATTR($$CN,os)__" =~ "rhel" ]];then xdsh $$CN clock -w;else xdsh $$CN hwclock -w ; fi
|
||||
cmd:chdef $$CN -p postscripts=setupntp
|
||||
cmd:chtab key=extntpservers site.value=""
|
||||
cmd:lsdef -t node -o $$CN -i postscripts -c > /tmp/postscripts
|
||||
check:rc==0
|
||||
cmd:chdef $$CN postscripts=setupntp
|
||||
cmd:lsdef -t site -o clustersite -i ntpservers -c >/tmp/ntpservers
|
||||
cmd:chtab key=ntpservers site.value=""
|
||||
cmd:makentp
|
||||
check:rc==0
|
||||
check:output=~configuring management node: $$MN
|
||||
cmd:updatenode $$CN -P setupntp
|
||||
check:rc==0
|
||||
check:output=~Running of postscripts has completed
|
||||
check:output=~Running postscript: setupntp
|
||||
check:output=~setupntp exited with code 0
|
||||
cmd:sleep 120
|
||||
cmd:xdsh $$CN date
|
||||
check:output=~$$DATE
|
||||
cmd:if [[ "__GETNODEATTR($$CN,os)__" =~ "rhel" ]];then xdsh $$CN clock ;else xdsh $$CN hwclock ; fi
|
||||
cmd:if [[ "__GETNODEATTR($$CN,os)__" =~ "rhel" ]];then clock ;else hwclock ; fi
|
||||
check:rc==0
|
||||
check:output=~$$DATE
|
||||
cmd:chdef $$CN -m postscripts=setupntp
|
||||
cmd:ntpserver=`cat /tmp/ntpserver | awk -F = '{print \$2}'`;chtab key=ntpservers site.value=$ntpserver
|
||||
check:rc==0
|
||||
cmd:rm -rf /tmp/ntpserve
|
||||
cmd:postscript=`cat /tmp/postscript | awk -F = '{print \$2}'`;chdef -t node -o $$CN postscripts=$postscript
|
||||
check:rc==0
|
||||
cmd:rm -rf /tmp/postscript
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user