2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-08-22 03:00:26 +00:00

Merge pull request #6009 from hu-weihua/dhcp

I agree to merge.Thanks @hu-weihua
This commit is contained in:
tingtli
2019-02-18 15:12:44 +08:00
committed by GitHub

View File

@@ -194,6 +194,7 @@ 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
stop:yes
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
@@ -213,7 +214,7 @@ cmd:if [ -f /var/lib/dhcpd/dhcpd.leases ]; then a="/var/lib/dhcpd/dhcpd.leases";
cmd:makedhcp testnode
check:rc==0
cmd:if [ -f /var/lib/dhcpd/dhcpd.leases ]; then a="/var/lib/dhcpd/dhcpd.leases"; elif [ -f /var/lib/dhcp/db/dhcpd.leases ]; then a="/var/lib/dhcp/db/dhcpd.leases"; elif [ -f "/var/lib/dhcp/dhcpd.leases" ]; then a="/var/lib/dhcp/dhcpd.leases";fi; ls -l $a; cat $a
cmd:a=2;while true; do [ $a -eq 64 ] && exit 1;output=$(makedhcp -q testnode);[ $? -ne 0 ] && exit 1;echo $output|grep testnode 2>/dev/null && exit 0;a=$[$a*2];sleep $a;done
cmd:a=2;while true; do [ $a -eq 64 ] && exit 1;output=$(makedhcp -q testnode);[ $? -ne 0 ] && exit 1;echo $output|grep testnode 2>/dev/null && exit 0;a=$[$a*2]; makedhcp testnode; sleep $a;done
check:rc==0
check:output=~testnode: ip-address = 100.100.100.2
cmd:makedhcp -d testnode