-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #491 from nik-netlox/main
K8s-calico-ipvs test cases updated to run with github local runners
- Loading branch information
Showing
17 changed files
with
292 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
#!/bin/bash | ||
for((i=0;i<50;i++)) | ||
do | ||
echo "snd=100" 1> sd1.pipe | ||
echo "snd=100" 1> sd2.pipe | ||
sleep 1 | ||
done | ||
|
||
|
||
echo "stats" 1> sd1.pipe | ||
echo "stats" 1> sd2.pipe | ||
|
||
echo "shutdown" 1> sd1.pipe | ||
echo "shutdown" 1> sd2.pipe | ||
|
||
pkill iperf | ||
pkill sctp_darn | ||
|
||
iperff_res=$(tail -n 1 iperff.out | xargs | cut -d ' ' -f 7) | ||
iperfd_res=$(tail -n 1 iperff.out | xargs | cut -d ' ' -f 7) | ||
|
||
sdf_res=$(grep -i "Client: Sending packets.(100000/100000)" sdf.out) | ||
sdd_res=$(grep -i "Client: Sending packets.(100000/100000)" sdd.out) | ||
|
||
sdf_res1=$(grep -i "packets sent" sdf.out | xargs | cut -d ' ' -f 3) | ||
sdf_res2=$(grep -i "packets rec" sdf.out | xargs | cut -d ' ' -f 3) | ||
|
||
sdd_res1=$(grep -i "packets sent" sdd.out | xargs | cut -d ' ' -f 3) | ||
sdd_res2=$(grep -i "packets rec" sdd.out | xargs | cut -d ' ' -f 3) | ||
|
||
if [[ $iperff_res != 0 ]]; then | ||
echo -e "K8s-calico-ipvs3-ha TCP\t\t(fullnat)\t[OK]" | ||
else | ||
echo -e "K8s-calico-ipvs3-ha TCP\t\t(fullnat)\t[FAILED]" | ||
code=1 | ||
fi | ||
|
||
if [[ $iperfd_res != 0 ]]; then | ||
echo -e "K8s-calico-ipvs3-ha TCP\t\t(default\t[OK]" | ||
else | ||
echo -e "K8s-calico-ipvs3-ha TCP\t\t(default)\t[FAILED]" | ||
code=1 | ||
fi | ||
|
||
if [[ $sdf_res1 != 0 && $sdf_res2 != 0 && $sdf_res1 == $sdf_res2 ]]; then | ||
echo -e "K8s-calico-ipvs3-ha SCTP\t(fullnat)\t[OK]" | ||
else | ||
echo -e "K8s-calico-ipvs3-ha SCTP\t(fullnat)\t[FAILED]" | ||
code=1 | ||
fi | ||
|
||
if [[ $sdd_res1 != 0 && $sdd_res2 != 0 && $sdd_res1 == $sdd_res2 ]]; then | ||
echo -e "K8s-calico-ipvs3-ha SCTP\t(default)\t[OK]" | ||
else | ||
echo -e "K8s-calico-ipvs3-ha SCTP\t(default)\t[FAILED]" | ||
code=1 | ||
fi | ||
rm *.pipe | ||
rm *.out | ||
exit $code |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
#!/bin/bash | ||
extIP=$(cat /vagrant/extIP) | ||
|
||
code=0 | ||
|
||
echo Service IP: $extIP | ||
|
||
numECMP=$(birdc show route | grep $extIP -A 3 | grep via | wc -l) | ||
|
||
birdc show route | grep $extIP -A 3 | ||
|
||
if [ $numECMP == "2" ]; then | ||
echo "Host route [OK]" | ||
else | ||
echo "Host route [NOK]" | ||
fi | ||
echo -e "\n*********************************************" | ||
echo "Testing Service" | ||
echo "*********************************************" | ||
|
||
# iperf client accessing fullnat service | ||
stdbuf -oL nohup iperf -c 20.20.20.1 -p 56002 -t 100 -i 1 -b 100M &> iperff.out & | ||
|
||
# iperf client accessing default service | ||
stdbuf -oL nohup iperf -c 20.20.20.1 -p 56003 -t 100 -i 1 -b 100M -B 30.30.30.1 &> iperfd.out & | ||
|
||
echo "iperf client started" | ||
|
||
sleep 1 | ||
|
||
mkfifo sd1.pipe | ||
mkfifo sd2.pipe | ||
|
||
sleep infinity > sd1.pipe & | ||
sleep infinity > sd2.pipe & | ||
|
||
stdbuf -oL nohup sctp_darn -H 192.168.90.9 -h 20.20.20.1 -p 56004 -s -I < sd1.pipe &> sdf.out & | ||
stdbuf -oL nohup sctp_darn -H 30.30.30.1 -h 20.20.20.1 -p 56005 -s -I < sd2.pipe &> sdd.out & | ||
|
||
echo "sctp_test client started" | ||
|
||
sleep 2 | ||
for((i=0;i<30;i++)) | ||
do | ||
echo "snd=100" 1> sd1.pipe | ||
echo "snd=100" 1> sd2.pipe | ||
sleep 1 | ||
done | ||
echo "phase-1 done" | ||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.