2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-29 09:13:08 +00:00

Merge pull request #5367 from hu-weihua/l_command

Looks good to me. I agree to merge. Thanks!
This commit is contained in:
tingtli 2018-07-04 14:58:09 +08:00 committed by GitHub
commit cae4061743
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 75 additions and 410 deletions

View File

@ -1,5 +1,7 @@
start:makedhcp_n
description:Create a new dhcp configuration file with a network statement for each network the dhcp daemon should listen on
os:Linux
label:mn_only,dhcp
cmd:if [ -f "/etc/dhcp/dhcpd.conf" ];then mv -f /etc/dhcp/dhcpd.conf /etc/dhcp/dhcpd.conf.bak ; elif [ -f "/etc/dhcpd.conf" ]; then mv -f /etc/dhcpd.conf /etc/dhcpd.conf.bak; fi
cmd:makedhcp -n
check:rc==0
@ -16,6 +18,7 @@ end
start:makedhcp_h
description:help
label:mn_only,dhcp
cmd:makedhcp -h
check:rc==0
check:output=~Usage
@ -23,6 +26,7 @@ end
start:makedhcp_help
description:help
label:mn_only,dhcp
cmd:makedhcp -h
check:rc==0
check:output=~Usage
@ -45,6 +49,7 @@ end
start:makedhcp_a_linux
description:Define all nodes to the DHCP server. (Will only add nodes that can be reached, network-wise, by this DHCP server.) The dhcp daemon does not have to be restarted after this.
os:Linux
label:mn_only,dhcp
cmd:mkdef -t node -o testnode1 groups=compute mac=11:22:33:55:66:88 arch=ppc64
cmd:chdef -t node -o testnode1 netboot=yaboot tftpserver=192.16.10.0 nfsserver=192.16.10.0 monserver=192.16.10.0 xcatmaster=192.16.10.0 installnic="mac" primarynic="mac"
cmd:lsdef -l testnode1 -z > /tmp/CN.stanza
@ -63,6 +68,7 @@ end
start:makedhcp_a_d_linux
os:Linux
label:mn_only,dhcp
cmd:lsdef -t node -l -z > /tmp/all.nodes
cmd:mkdef -t node -o testnode1 groups=compute mac=11:22:33:55:66:88 arch=ppc64
cmd:mkdef -t node -o testnode2 groups=compute mac=11:22:33:55:66:99 arch=ppc64
@ -81,12 +87,13 @@ check:output=~testnode2
cmd:cat /tmp/all.nodes | chdef -z
cmd:rmdef testnode1
cmd:rmdef testnode2
#cmd:rm -f /tmp/1 /tmp/2
cmd:rm -f /tmp/1 /tmp/2
end
start:makedhcp_d_linux
description:Delete all node entries, added by xCAT, in the noderange from the DHCP server configuration.
os:Linux
label:mn_only,dhcp
cmd:mkdef -t node -o testnode1 groups=compute mac=11:22:33:55:66:88 arch=ppc64
cmd:chdef -t node -o testnode1 netboot=yaboot tftpserver=192.16.10.0 nfsserver=192.16.10.0 monserver=192.16.10.0 xcatmaster=192.16.10.0 installnic="mac" primarynic="mac"
cmd:if [ -f "/etc/dhcp/dhcpd.conf" ];then mv -f /etc/dhcp/dhcpd.conf /etc/dhcp/dhcpd.conf.bak ; elif [ -f "/etc/dhcpd.conf" ]; then mv -f /etc/dhcpd.conf /etc/dhcpd.conf.bak; fi
@ -109,6 +116,7 @@ end
start:makedhcp_a
os:Linux
label:cn_os_ready,dhcp
cmd:lsdef -l $$CN -z > /tmp/$$CN.stanza
cmd:chdef -t node -o $$CN mac=11:22:33:44:55:66
cmd:makedhcp -a
@ -120,8 +128,10 @@ check:output=~11:22:33:44:55:66
cmd:chdef -t node -o $$CN mac=
cmd:cat /tmp/$$CN.stanza | chdef -z
end
start:makedhcp_a_ubuntu
os:Linux
os:ubuntu
label:cn_os_ready,dhcp
cmd:lsdef -l $$CN -z > /tmp/$$CN.stanza
cmd:chdef -t node -o $$CN mac=11:22:33:44:55:66
cmd:makedhcp -a
@ -135,6 +145,7 @@ end
start:makedhcp_a_d
os:Linux
label:cn_os_ready,dhcp
cmd:makedhcp -a -d
check:rc==0
cmd:service dhcpd restart
@ -143,8 +154,10 @@ check:rc==0
check:output!~$$CN
cmd:makedhcp -a
end
start:makedhcp_a_d_ubuntu
os:Linux
os:ubuntu
label:cn_os_ready,dhcp
cmd:makedhcp -a -d
check:rc==0
cmd:service isc-dhcp-server restart
@ -155,6 +168,7 @@ end
start:makedhcp_d
os:Linux
label:cn_os_ready,dhcp
cmd:makedhcp -d $$CN
check:rc==0
cmd:service dhcpd restart
@ -165,6 +179,8 @@ end
start:makedhcp_remote_network
descriptiion:This case is to test when there is mgtifname='!remote!<nicname>', makedhcp could work correctly and create entrys in dhcp lease file.
os:linux
label:mn_only,dhcp
cmd:mkdef -t network -o testnetwork net=100.100.100.0 mask=255.255.255.0 mgtifname='!remote!eth0' gateway=100.100.100.1
check:rc==0
cmd:lsdef -t network

View File

@ -1,5 +1,6 @@
start:makedns_h
description:help
label:mn_only,dns
cmd:makedns -h
check:rc==0
cmd:makedns --help
@ -9,6 +10,7 @@ end
start:makedns_d_node
description:makedns -d noderange
label:mn_only,dns
cmd:chtab netname=testnetwork networks.net=100.100.100.0 networks.mask=255.255.255.0 networks.mgtifname=eth0 networks.gateway=100.100.100.254
check:rc==0
cmd:chdef -t node -o dnstestnode groups=all ip=100.100.100.1
@ -35,6 +37,7 @@ end
start:makedns_node
description:makedns noderange
label:mn_only,dns
cmd:chtab netname=testnetwork networks.net=100.100.100.0 networks.mask=255.255.255.0 networks.mgtifname=eth0 networks.gateway=100.100.100.254
check:rc==0
cmd:chdef -t node -o dnstestnode groups=all ip=100.100.100.1
@ -61,6 +64,8 @@ end
start:makedns_ubuntu_n
description:makedns -n
os:ubuntu
label:mn_only,dns
cmd:chtab netname=testnetwork networks.net=100.100.100.0 networks.mask=255.255.255.0 networks.mgtifname=eth0 networks.gateway=100.100.100.254
check:rc==0
cmd:cp /etc/hosts /etc/hosts.testbak
@ -90,8 +95,11 @@ cmd:nslookup dnstestnode $$MN
check:output~=Server: $$MN
check:output~=(server can't find dnstestnode)
end
start:makedns_n
description:makedns -n
os:rhels,sles
label:mn_only,dns
cmd:chtab netname=testnetwork networks.net=100.100.100.0 networks.mask=255.255.255.0 networks.mgtifname=eth0 networks.gateway=100.100.100.254
check:rc==0
cmd:cp /etc/hosts /etc/hosts.testbak
@ -124,6 +132,7 @@ end
start:makedns
description:makedns
label:mn_only,dns
cmd:chtab netname=testnetwork networks.net=100.100.100.0 networks.mask=255.255.255.0 networks.mgtifname=eth0 networks.gateway=100.100.100.254
check:rc==0
cmd:makedns -n
@ -171,6 +180,7 @@ end
start:makedns_environment_check_forworder_mode
description:check basic environment of makedns in hierarchical arch and sn acts forworder
os:rhels
label:cn_os_ready,dns
cmd:chtab key=nameservers site.value="<xcatmaster>"
check:rc==0
cmd:chdef service setupnameserver=1 setupdhcp=1
@ -237,6 +247,7 @@ end
start:makedns_environment_check_forworder_mode
description:check basic environment of makedns in hierarchical arch and sn acts forworder
os:sles
label:cn_os_ready,dns
cmd:chtab key=nameservers site.value="<xcatmaster>"
check:rc==0
cmd:chdef service setupnameserver=1 setupdhcp=1
@ -301,88 +312,10 @@ check:output~=running
end
start:makedns_environment_check_forworder_mode
description:check basic environment of makedns in hierarchical arch and sn acts forworder
os:AIX
cmd:chtab key=nameservers site.value="<xcatmaster>"
check:rc==0
cmd:chdef service setupnameserver=1 setupdhcp=1
check:rc==0
cmd:tabdump servicenode
check:rc==0
cmd:chtab netname=testnetwork networks.net=100.100.100.0 networks.mask=255.255.255.0 networks.mgtifname=eth0 networks.gateway=100.100.100.254
check:rc==0
cmd:cp /etc/hosts /etc/hosts.testbak
check:rc==0
cmd:echo "100.100.100.1 dnstestnode" >> /etc/hosts
check:rc==0
cmd:makedns -n
check:rc==0
cmd:xdsh $$SN "stopsrc -s xcatd"
check:rc==0
cmd:sleep 5
cmd:xdsh $$SN "lssrc -s xcatd"
check:output~=inoperative
cmd:xdsh $$SN "startsrc -s xcatd"
check:rc==0
cmd:sleep 10
cmd:xdsh $$SN "lssrc -s xcatd"
check:output~=active
cmd:more /etc/resolv.conf|grep nameserver
check:rc==0
cmd:xdsh $$SN "more /etc/resolv.conf|grep nameserver"
check:rc==0
cmd:xdsh $$CN "more /etc/resolv.conf|grep nameserver"
cmd:tabdump site|grep nameservers
check:rc==0
cmd:tabdump networks
check:rc==0
cmd:lsdef $$SN -i setupnameserver|grep setupnameserver
check:rc==0
check:output~=1
cmd:lsdef $$SN -i setupdhcp|grep setupdhcp
check:rc==0
check:output~=1
cmd:lssrc -s named
check:output~=active
cmd:nslookup dnstestnode $$MN
check:output~=Server: $$MN
check:output!~(server can't find dnstestnode)
cmd:xdsh $$SN "lssrc -s named"
check:output~=active
cmd:xdsh $$SN "more /etc/named.conf"
check:rc==0
check:output~=forward only
cmd:nslookup $$SN $$MN
check:output~=Server: $$MN
check:output!~(server can't find $$SN)
cmd:nslookup dnstestnode $$SN
check:output~=Server: $$SN
check:output!~(server can't find dnstestnode)
cmd:rm -f /etc/hosts
check:rc==0
cmd:mv /etc/hosts.testbak /etc/hosts
check:rc==0
cmd:chtab -d netname=testnetwork networks
check:rc==0
cmd:makedns -n
check:rc==0
cmd:xdsh $$SN "stopsrc -s xcatd"
check:rc==0
cmd:sleep 5
cmd:xdsh $$SN "lssrc -s xcatd"
check:output~=inoperative
cmd:xdsh $$SN "startsrc -s xcatd"
check:rc==0
cmd:sleep 10
cmd:xdsh $$SN "lssrc -s xcatd"
check:output~=active
end
start:makedns_environment_check_master_slave_mode
description:check basic environment of makedns in hierarchical arch and sn acts slave
os:rhels
label:cn_os_ready,dns
cmd:chtab key=nameservers site.value="<xcatmaster>,$$MNIP"
check:rc==0
cmd:chdef service setupnameserver=2 setupdhcp=1
@ -453,6 +386,7 @@ end
start:makedns_environment_check_master_slave_mode
description:check basic environment of makedns in hierarchical arch and sn acts slave
os:sles
label:cn_os_ready,dns
cmd:chtab key=nameservers site.value="<xcatmaster>,$$MNIP"
check:rc==0
cmd:chdef service setupnameserver=2 setupdhcp=1
@ -520,88 +454,12 @@ cmd:xdsh $$SN "service xcatd status"
check:output~=running
end
start:makedns_environment_check_master_slave_mode
description:check basic environment of makedns in hierarchical arch and sn acts slave
os:AIX
cmd:chtab key=nameservers site.value="<xcatmaster>,$$MNIP"
check:rc==0
cmd:chdef service setupnameserver=2 setupdhcp=1
check:rc==0
cmd:tabdump servicenode
check:rc==0
cmd:chtab netname=testnetwork networks.net=100.100.100.0 networks.mask=255.255.255.0 networks.mgtifname=eth0 networks.gateway=100.100.100.254
check:rc==0
cmd:cp /etc/hosts /etc/hosts.testbak
check:rc==0
cmd:echo "100.100.100.1 dnstestnode" >> /etc/hosts
check:rc==0
cmd:makedns -n
check:rc==0
cmd:xdsh $$SN "stopsrc -s xcatd"
check:rc==0
cmd:sleep 5
cmd:xdsh $$SN "lssrc -s xcatd"
check:output~=inoperative
cmd:xdsh $$SN "startsrc -s xcatd"
check:rc==0
cmd:sleep 10
cmd:xdsh $$SN "lssrc -s xcatd"
check:output~=active
cmd:more /etc/resolv.conf|grep nameserver
check:rc==0
cmd:xdsh $$SN "more /etc/resolv.conf|grep nameserver"
check:rc==0
cmd:xdsh $$CN "more /etc/resolv.conf|grep nameserver"
cmd:tabdump site|grep nameservers
check:rc==0
cmd:tabdump networks
check:rc==0
cmd:lsdef $$SN -i setupnameserver|grep setupnameserver
check:rc==0
check:output~=2
cmd:lsdef $$SN -i setupdhcp|grep setupdhcp
check:rc==0
check:output~=1
cmd:lssrc -s named
check:output~=active
cmd:nslookup dnstestnode $$MN
check:output~=Server: $$MN
check:output!~(server can't find dnstestnode)
cmd:xdsh $$SN "lssrc -s named"
check:output~=active
cmd:xdsh $$SN "more /etc/named.conf"
check:rc==0
check:output~=type slave
cmd:nslookup $$SN $$MN
check:output~=Server: $$MN
check:output!~(server can't find $$SN)
cmd:nslookup dnstestnode $$SN
check:output~=Server: $$SN
check:output!~(server can't find dnstestnode)
cmd:rm -f /etc/hosts
check:rc==0
cmd:mv /etc/hosts.testbak /etc/hosts
check:rc==0
cmd:chtab -d netname=testnetwork networks
check:rc==0
cmd:makedns -n
check:rc==0
cmd:xdsh $$SN "stopsrc -s xcatd"
check:rc==0
cmd:sleep 5
cmd:xdsh $$SN "lssrc -s xcatd"
check:output~=inoperative
cmd:xdsh $$SN "startsrc -s xcatd"
check:rc==0
cmd:sleep 10
cmd:xdsh $$SN "lssrc -s xcatd"
check:output~=active
end
#---------------------------------------------------------------------
start:makedns_when_nameserver_on_mn_down
description:when nameserver on mn down, nameserver on sn should provide service
os:rhels
label:cn_os_ready,dns
cmd:chtab netname=testnetwork networks.net=100.100.100.0 networks.mask=255.255.255.0 networks.mgtifname=eth0 networks.gateway=100.100.100.254
check:rc==0
cmd:cp /etc/hosts /etc/hosts.testbak
@ -660,6 +518,7 @@ end
start:makedns_when_nameserver_on_mn_down
description:when nameserver on mn down, nameserver on sn should provide service
os:sles
label:cn_os_ready,dns
cmd:chtab netname=testnetwork networks.net=100.100.100.0 networks.mask=255.255.255.0 networks.mgtifname=eth0 networks.gateway=100.100.100.254
check:rc==0
cmd:cp /etc/hosts /etc/hosts.testbak
@ -711,76 +570,11 @@ cmd:xdsh $$SN "service xcatd status"
check:output~=running
end
start:makedns_when_nameserver_on_mn_down
description:when nameserver on mn down, nameserver on sn should provide service
os:AIX
cmd:chtab netname=testnetwork networks.net=100.100.100.0 networks.mask=255.255.255.0 networks.mgtifname=eth0 networks.gateway=100.100.100.254
check:rc==0
cmd:cp /etc/hosts /etc/hosts.testbak
check:rc==0
cmd:echo "100.100.100.1 dnstestnode" >> /etc/hosts
check:rc==0
cmd:makedns -n
check:rc==0
cmd:lssrc -s named
check:output~=active
cmd:xdsh $$SN "stopsrc -s xcatd"
check:rc==0
cmd:sleep 5
cmd:xdsh $$SN "lssrc -s xcatd"
check:output~=inoperative
cmd:xdsh $$SN "startsrc -s xcatd"
check:rc==0
cmd:sleep 10
cmd:xdsh $$SN "lssrc -s xcatd"
check:output~=active
cmd:nslookup dnstestnode $$MN
check:output~=Server: $$MN
check:output!~(server can't find dnstestnode)
cmd:sleep 5
cmd:nslookup dnstestnode $$SN
check:output~=Server: $$SN
check:output!~(server can't find dnstestnode)
cmd:stopsrc -s named
check:rc==0
cmd:sleep 3
cmd:lssrc -s named
check:output~=inoperative
cmd:nslookup dnstestnode $$MN
check:output~=Server: $$MN
check:output~=(server can't find dnstestnode)
cmd:sleep 5
cmd:nslookup dnstestnode $$SN
check:output~=Server: $$SN
check:output!~(server can't find dnstestnode)
cmd:startsrc -s named
check:rc==0
cmd:lssrc -a |grep named
check:rc==0
check:output~=active
cmd:rm -f /etc/hosts
check:rc==0
cmd:mv /etc/hosts.testbak /etc/hosts
check:rc==0
cmd:chtab -d netname=testnetwork networks
check:rc==0
cmd:makedns -n
check:rc==0
cmd:xdsh $$SN "stopsrc -s xcatd"
check:rc==0
cmd:sleep 5
cmd:xdsh $$SN "lssrc -s xcatd"
check:output~=inoperative
cmd:xdsh $$SN "startsrc -s xcatd"
check:rc==0
cmd:sleep 10
cmd:xdsh $$SN "lssrc -s xcatd"
check:output~=active
end
start:makedns_when_nameserver_on_sn_down
description:when nameserver on sn down, nameserver on mn should provide service
os:rhels
label:cn_os_ready,dns
cmd:chtab netname=testnetwork networks.net=100.100.100.0 networks.mask=255.255.255.0 networks.mgtifname=eth0 networks.gateway=100.100.100.254
check:rc==0
cmd:cp /etc/hosts /etc/hosts.testbak
@ -841,6 +635,7 @@ end
start:makedns_when_nameserver_on_sn_down
description:when nameserver on sn down, nameserver on mn should provide service
os:sles
label:cn_os_ready,dns
cmd:chtab netname=testnetwork networks.net=100.100.100.0 networks.mask=255.255.255.0 networks.mgtifname=eth0 networks.gateway=100.100.100.254
check:rc==0
cmd:cp /etc/hosts /etc/hosts.testbak
@ -893,78 +688,11 @@ check:rc==0
check:output~=running
end
start:makedns_when_nameserver_on_sn_down
description:when nameserver on sn down, nameserver on mn should provide service
os:AIX
cmd:chtab netname=testnetwork networks.net=100.100.100.0 networks.mask=255.255.255.0 networks.mgtifname=eth0 networks.gateway=100.100.100.254
check:rc==0
cmd:cp /etc/hosts /etc/hosts.testbak
check:rc==0
cmd:echo "100.100.100.1 dnstestnode" >> /etc/hosts
check:rc==0
cmd:makedns -n
check:rc==0
cmd:lssrc -s named
check:output~=active
cmd:xdsh $$SN "stopsrc -s xcatd"
check:rc==0
cmd:sleep 5
cmd:xdsh $$SN "lssrc -s xcatd"
check:output~=inoperative
cmd:xdsh $$SN "startsrc -s xcatd"
check:rc==0
cmd:sleep 10
cmd:xdsh $$SN "lssrc -s xcatd"
check:output~=active
cmd:nslookup dnstestnode $$MN
check:output~=Server: $$MN
check:output!~(server can't find dnstestnode)
cmd:sleep 10
cmd:nslookup dnstestnode $$SN
check:output~=Server: $$SN
check:output!~(server can't find dnstestnode)
cmd:xdsh $$SN "stopsrc -s named"
check:rc==0
cmd:xdsh $$SN "lssrc -s named"
check:rc==0
check:output~=inoperative
cmd:nslookup dnstestnode $$MN
check:output~=Server: $$MN
check:output!~(server can't find dnstestnode)
cmd:sleep 5
cmd:nslookup dnstestnode $$SN
check:output~=Server: $$SN
check:output~=(server can't find dnstestnode)
cmd:xdsh $$SN "startsrc -s named"
check:rc==0
cmd:xdsh $$SN "lssrc -s named"
check:rc==0
check:output~=active
cmd:rm -f /etc/hosts
check:rc==0
cmd:mv /etc/hosts.testbak /etc/hosts
check:rc==0
cmd:chtab -d netname=testnetwork networks
check:rc==0
cmd:makedns -n
check:rc==0
cmd:xdsh $$SN "stopsrc -s xcatd"
check:rc==0
cmd:sleep 5
cmd:xdsh $$SN "lssrc -s xcatd"
check:output~=inoperative
cmd:xdsh $$SN "startsrc -s xcatd"
check:rc==0
cmd:sleep 10
cmd:xdsh $$SN "lssrc -s xcatd"
check:output~=active
end
#999999999999999999999999999
start:makedns_nameserver_on_sn_sync_db
description:when nameserver's db on mn was changed, nameserver's db on sn should be synchronized
os:Linux
label:cn_os_ready,dns
cmd:chtab netname=testnetwork networks.net=100.100.100.0 networks.mask=255.255.255.0 networks.mgtifname=eth0 networks.gateway=100.100.100.254
check:rc==0
cmd:makedns -n
@ -1004,67 +732,9 @@ check:rc==0
end
start:makedns_nameserver_on_sn_sync_db
description:when nameserver's db on mn was changed, nameserver's db on sn should be synchronized
os:AIX
cmd:chtab netname=testnetwork networks.net=100.100.100.0 networks.mask=255.255.255.0 networks.mgtifname=eth0 networks.gateway=100.100.100.254
check:rc==0
cmd:makedns -n
check:rc==0
cmd:xdsh $$SN "stopsrc -s xcatd"
check:rc==0
cmd:sleep 5
cmd:xdsh $$SN "lssrc -s xcatd"
check:output~=inoperative
cmd:xdsh $$SN "startsrc -s xcatd"
check:rc==0
cmd:sleep 10
cmd:xdsh $$SN "lssrc -s xcatd"
check:output~=active
cmd:chdef -t node -o dnstestnode groups=all ip=100.100.100.2
check:rc==0
cmd:makedns dnstestnode
check:rc==0
cmd:nslookup dnstestnode $$MN
check:rc==0
check:output~=Server: $$MN
check:output!~(server can't find dnstestnode)
cmd:sleep 2
cmd:nslookup dnstestnode $$SN
check:rc==0
check:output~=Server: $$SN
check:output!~(server can't find dnstestnode)
cmd:makedns -d dnstestnode
check:rc==0
cmd:nslookup dnstestnode $$MN
check:output~=Server: $$MN
check:output~=(server can't find dnstestnode)
cmd:sleep 2
cmd:nslookup dnstestnode $$SN
check:output~=Server: $$SN
check:output~=(server can't find dnstestnode)
cmd:rmdef -t node dnstestnode
check:rc==0
cmd:chtab -d netname=testnetwork networks
check:rc==0
cmd:makedns -n
check:rc==0
cmd:xdsh $$SN "stopsrc -s xcatd"
check:rc==0
cmd:sleep 5
cmd:xdsh $$SN "lssrc -s xcatd"
check:output~=inoperative
cmd:xdsh $$SN "startsrc -s xcatd"
check:rc==0
cmd:sleep 10
cmd:xdsh $$SN "lssrc -s xcatd"
check:output~=active
end
start:makedns_nameserver_on_sn_sync_conf
description:when nameserver's conf file on mn was changed, nameserver's conf file on sn should be synchronized when xcatd restart
os:Linux
label:cn_os_ready,dns,
cmd:makedns -n
check:rc==0
cmd:cat /etc/named.conf
@ -1105,68 +775,11 @@ check:rc==0
check:output!~=zone "100.100.100.IN-ADDR.ARPA."
end
start:makedns_nameserver_on_sn_sync_conf
description:when nameserver's conf file on mn was changed, nameserver's conf file on sn should be synchronized when xcatd restart
os:AIX
cmd:makedns -n
check:rc==0
cmd:cat /etc/named.conf
check:rc==0
check:output!~zone "100.100.100.IN-ADDR.ARPA."
cmd:xdsh $$SN "cat /etc/named.conf"
check:rc==0
check:output!~zone "100.100.100.IN-ADDR.ARPA."
cmd:chtab netname=testnetwork networks.net=100.100.100.0 networks.mask=255.255.255.0 networks.mgtifname=eth0 networks.gateway=100.100.100.254
check:rc==0
cmd:makedns -n
check:rc==0
cmd:cat /etc/named.conf
check:rc==0
check:output~=zone "100.100.100.IN-ADDR.ARPA."
cmd:xdsh $$SN "cat /etc/named.conf"
check:rc==0
check:output!~zone "100.100.100.IN-ADDR.ARPA."
cmd:xdsh $$SN "stopsrc -s xcatd"
check:rc==0
cmd:sleep 5
cmd:xdsh $$SN "lssrc -s xcatd"
check:output~=inoperative
cmd:xdsh $$SN "startsrc -s xcatd"
check:rc==0
cmd:sleep 10
cmd:xdsh $$SN "lssrc -s xcatd"
check:output~=active
cmd:xdsh $$SN "cat /etc/named.conf"
check:rc==0
check:output~=zone "100.100.100.IN-ADDR.ARPA."
cmd:chtab -d netname=testnetwork networks
check:rc==0
cmd:makedns -n
check:rc==0
cmd:cat /etc/named.conf
check:rc==0
check:output!~zone "100.100.100.IN-ADDR.ARPA."
cmd:xdsh $$SN "cat /etc/named.conf"
check:rc==0
check:output~=zone "100.100.100.IN-ADDR.ARPA."
cmd:xdsh $$SN "stopsrc -s xcatd"
check:rc==0
cmd:sleep 5
cmd:xdsh $$SN "lssrc -s xcatd"
check:output~=inoperative
cmd:xdsh $$SN "startsrc -s xcatd"
check:rc==0
cmd:sleep 10
cmd:xdsh $$SN "lssrc -s xcatd"
check:output~=active
cmd:xdsh $$SN "cat /etc/named.conf"
check:rc==0
check:output!~=zone "100.100.100.IN-ADDR.ARPA."
end
start:makedns_nameserver_on_sn_sync_db_when_sn_down
description:when nameserver's db on mn was changed and name server on SN down at the same time, when name server on SN restart, it should sync the latest name server db on MN
os:rhels
label:cn_os_ready,dns
cmd:makedns -n
check:rc==0
cmd:service named status
@ -1221,6 +834,7 @@ end
start:makedns_n_noderange
description:to verify makedns -n noderange works as design. add case for bug #2572. Test case bug number is #2826.
label:mn_only,dns
cmd:chtab netname=testnetwork networks.net=100.100.100.0 networks.mask=255.255.255.0 networks.mgtifname=eth0 networks.gateway=100.100.100.254
check:rc==0
cmd:chdef -t node -o dnstestnode[1-10] groups=dnsnode ip="|dnstestnode(\d+)|100.100.100.(\$1+0)|"

View File

@ -1,4 +1,5 @@
start:makehosts_h
label:mn_only,dns
description:makehosts -h
cmd:makehosts -h
check:rc==0
@ -6,6 +7,7 @@ check:output=~Usage
end
start:makehosts_help
label:mn_only,dns
description:makehosts --help
cmd:makehosts --help
check:rc==0
@ -14,6 +16,7 @@ end
start:makehosts_null
description:makehosts
label:mn_only,dns
cmd:cp -f /etc/hosts /etc/hosts.xcatbakautotest
cmd:chtab node=nouse_compute hosts.ip="|node(\d+)|1.2.3.(\$1+0)|" hosts.hostnames="|(.*)|(\$1).cluster.net|"
check:rc==0
@ -35,6 +38,7 @@ cmd:mv -f /etc/hosts.xcatbakautotest /etc/hosts
end
start:makehosts_l
label:mn_only,dns
cmd:cp -f /etc/hosts /etc/hosts.xcatbakautotest
cmd:chtab node=nouse_compute hosts.ip="|node(\d+)|1.2.3.(\$1+0)|" hosts.hostnames="|(.*)|(\$1).cluster.net|"
check:rc==0
@ -56,6 +60,7 @@ cmd:rm -rf /tmp/hosts
end
start:makehosts_d
label:mn_only,dns
cmd:cp -f /etc/hosts /etc/hosts.xcatbakautotest
cmd:chtab node=compute hosts.ip="|node(\d+)|1.2.3.(\$1+0)|" hosts.hostnames="|(.*)|(\$1).cluster.net|"
check:rc==0
@ -78,6 +83,7 @@ cmd:rm -f /tmp/1 /tmp/2
end
start:makehosts_n
label:mn_only,dns
cmd:cp -f /etc/hosts /etc/hosts.xcatbakautotest
cmd:chtab node=nouse_compute hosts.ip="|node(\d+)|1.2.3.(\$1+0)|" hosts.hostnames="|(.*)|(\$1).cluster.net|"
check:rc==0
@ -102,6 +108,7 @@ cmd:rm -rf /tmp/hosts
end
start:makehosts_n_noderange
label:mn_only,dns
cmd:cp -f /etc/hosts /etc/hosts.xcatbakautotest
cmd:chtab node=compute hosts.ip="|node(\d+)|1.2.3.(\$1+0)|" hosts.hostnames="|(.*)|(\$1).cluster.net|"
check:rc==0
@ -126,6 +133,7 @@ cmd:rm -rf /tmp/hosts
end
start:makehost_n_r
label:mn_only,dns
descriptions:modify makehosts testcases according to special node name eg:s01 and s01r* . for issue #2717 and #2683
cmd:cp -f /etc/hosts /etc/hosts.xcatbakautotest
cmd:lsdef s01;if [ $? -eq 0 ]; then lsdef -l s01 -z >/tmp/s01.standa ;rmdef s01;fi
@ -173,6 +181,7 @@ cmd:mv -f /etc/hosts.xcatbakautotest /etc/hosts
end
start:makehosts_regex
label:mn_only,dns
description:this case is to test if makehosts support regex. This case is for bug 2578.
cmd:cp /etc/hosts /etc/hosts.bak
cmd:if lsdef -z sn4b;then lsdef -z sn4b|tee /tmp/sn4bdef;noderm sn4b;fi

View File

@ -1,15 +1,18 @@
start:xdcp_h
label:mn_only,parallel_cmds
cmd:xdcp -h
check:rc==0
end
start:xdcp_V
label:mn_only,parallel_cmds
cmd:xdcp -V
check:rc==0
check:output=~Version
end
start:xdcp_src_dst
label:cn_os_ready,parallel_cmds
cmd:xdsh $$CN rm -f /tmp/hosts
cmd:xdcp $$CN /etc/hosts /tmp/hosts
check:rc==0
@ -24,6 +27,7 @@ cmd:rm -f /tmp/hosts
end
start:xdcp_P_src_dst
label:cn_os_ready,parallel_cmds
cmd:xdcp $$CN -P /etc/inittab /tmp/
check:rc==0
cmd:xdsh $$CN cat /etc/inittab > /tmp/inittab1
@ -35,6 +39,7 @@ end
start:xdcp_RP
label:cn_os_ready,parallel_cmds
cmd:xdsh $$CN "mkdir -p /tmp/xdcp/test1"
check:rc==0
cmd:xdsh $$CN "echo "test1" > /tmp/xdcp/test1/test1.txt"
@ -63,6 +68,7 @@ check:rc==0
end
start:xdcp_R
label:cn_os_ready,parallel_cmds
cmd:mkdir -p /tmp/xdcp/test1
check:rc==0
cmd:echo "test1" > /tmp/xdcp/test1/test1.txt
@ -93,6 +99,7 @@ check:rc==0
end
start:xdcp_all_files_of_dir
label:cn_os_ready,parallel_cmds
cmd:mkdir -p /tmp/xdcp/
check:rc==0
cmd:echo "test1" > /tmp/xdcp/test1.txt
@ -116,6 +123,7 @@ end
start:xdcp_rsync
label:cn_os_ready,parallel_cmds
cmd:mkdir -p /tmp/xdcp/
check:rc==0
cmd:echo "test1" > /tmp/xdcp/test1.txt
@ -139,6 +147,7 @@ end
start:xdcp_rsyncfile_single_file
label:cn_os_ready,parallel_cmds
cmd:mkdir -p /tmp/xdcp/
check:rc==0
cmd:echo "test1" > /tmp/xdcp/test1.txt
@ -159,6 +168,7 @@ end
start:xdcp_rsyncfile_files
label:cn_os_ready,parallel_cmds
cmd:mkdir -p /tmp/xdcp/
check:rc==0
cmd:echo "test1" > /tmp/xdcp/test1.txt
@ -184,6 +194,7 @@ end
start:xdcp_rsyncfile_files_changename
label:cn_os_ready,parallel_cmds
cmd:mkdir -p /tmp/xdcp/
check:rc==0
cmd:echo "test1" > /tmp/xdcp/test1.txt

View File

@ -1,4 +1,5 @@
start:xdcp_nonroot_user
label:cn_os_ready,parallel_cmds
cmd:useradd -m xyzzy
check:rc==0
cmd:bash -c "( cd ~root && tar cf - .xcat .ssh ) | ( cd ~xyzzy && tar xf - )"

View File

@ -1,27 +1,32 @@
start:xdsh_h
label:mn_only,parallel_cmds
cmd:xdsh -h
check:rc==0
end
start:xdsh_V
label:mn_only,parallel_cmds
cmd:xdsh -V
check:rc==0
check:output=~Version
end
start:xdsh_regular_command
label:cn_os_ready,parallel_cmds
cmd:XCATBYPASS=1 xdsh $$CN "ps -ef"
check:rc==0
check:output=~$$CN: UID PID PPID C STIME TTY TIME CMD
end
start:xdsh_Q_command
label:cn_os_ready,parallel_cmds
cmd:xdsh $$CN -Q "ps -ef"
check:rc==0
check:output=~
end
start:xdsh_c_sn
label:cn_os_ready,parallel_cmds
cmd:xdsh $$SN "ls -l /var/xcat/syncfiles" > /dev/null 2>&1; if [ "$?" -ne "0" ]; then xdsh $$SN "mkdir -p /var/xcat/syncfiles";fi
check:rc==0
cmd: xdsh $$SN "echo 'test' > /var/xcat/syncfiles/xdsh_c.tmp"
@ -34,6 +39,7 @@ check:output=~
end
start:xdsh_c_cn
label:cn_os_ready,parallel_cmds
cmd:xdsh $$CN "ls -l /var/xcat/node/syncfiles" > /dev/null 2>&1; if [ "$?" -ne "0" ]; then xdsh $$CN "mkdir -p /var/xcat/node/syncfiles";fi
check:rc==0
cmd: xdsh $$CN "echo 'test' > /var/xcat/node/syncfiles/xdsh_c.tmp"
@ -46,6 +52,7 @@ check:output=~
end
start:xdsh_e_filename
label:cn_os_ready,parallel_cmds
cmd:echo "echo 'xdsh_e_filename test' > /tmp/xdsh_e_filename.txt" > /tmp/xdsh_script.sh
check:rc==0
cmd:chmod +x /tmp/xdsh_script.sh
@ -63,6 +70,7 @@ check:rc==0
end
start:xdsh_E
label:cn_os_ready,parallel_cmds
cmd:echo 'export DSH_FANOUT=8' > /tmp/xdsh.test
check:rc==0
cmd:xdsh $$CN -E /tmp/xdsh.test "export |grep DSH_FANOUT"
@ -73,6 +81,7 @@ check:rc==0
end
start:xdsh_i_linux
label:cn_os_ready,parallel_cmds
cmd: copycds $$ISO
check:rc==0
cmd: genimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute
@ -84,6 +93,7 @@ end
start:xdsh_t
label:cn_os_ready,parallel_cmds
cmd:date +%s > /tmp/start.txt
check:rc==0
cmd:xdsh $$CN -t 5 "ssh 1.1.1.1"
@ -98,12 +108,14 @@ cmd:rm -f /tmp/start.txt /tmp/end.txt
end
start:xdsh_q
label:cn_os_ready,parallel_cmds
cmd:xdsh $$CN -q
check:rc==0
check:output=~DSH:DSH_FANOUT=
end
start:xdsh_T
label:cn_os_ready,parallel_cmds
cmd:xdsh $$CN -T "hostname"
check:rc==0
check:output=~TRACE:Default context is XCAT
@ -111,6 +123,7 @@ check:output=~$$CN: $$CN
end
start:xdsh_o
label:cn_os_ready,parallel_cmds
cmd:xdsh $$CN -o "-v" date
check:rc==0
check:output=~$$CN: OpenSSH

View File

@ -1,5 +1,6 @@
start:xdsh_permission_denied
description: Test the exit code when command xdsh failed
label:cn_os_ready,parallel_cmds
cmd:xdsh $$CN date
check:rc==0
cmd:mv /root/.ssh/id_rsa /root/.ssh/id_rsa.backup