Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

loxilb IP tested as service IP - added in tcplb and nat64 cicd #334

Merged
merged 1 commit into from
Jun 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cicd/nat64tcp/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,5 @@ $hexec llb1 ethtool --offload ellb1l3ep3 rx off tx off
$hexec llb1 ethtool -K ellb1l3ep3 gso off

$dexec llb1 loxicmd create lb 2001::1 --tcp=2020:8080 --endpoints=31.31.31.1:1,32.32.32.1:1,33.33.33.1:1
$dexec llb1 loxicmd create lb 3ffe::2 --tcp=2020:8080 --endpoints=31.31.31.1:1,32.32.32.1:1,33.33.33.1:1
sleep 10
21 changes: 18 additions & 3 deletions cicd/nat64tcp/validation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ $hexec l3ep3 node ../common/tcp_server.js server3 &

sleep 5
code=0
servIP=( "3ffe::2" "2001::1" )
servArr=( "server1" "server2" "server3" )
ep=( "31.31.31.1" "32.32.32.1" "33.33.33.1" )
j=0
Expand Down Expand Up @@ -34,14 +35,19 @@ do
done

res=$($hexec l3h1 curl -s --max-time 20 '[2001::1]:2020')
res=$($hexec l3h1 curl -s --max-time 20 '[3ffe::2]:2020')
sleep 4

nid=0
for k in {0..1}
do
echo "Testing Service IP: ${servIP[k]}"
lcode=0
for i in {1..4}
do
for j in {0..2}
do
res=$($hexec l3h1 curl -s -j -6 --max-time 10 '[2001::1]:2020')
res=$($hexec l3h1 curl -s -j -6 --max-time 10 "[${servIP[k]}]:2020")
echo $res
ids=`echo "${res//[!0-9]/}"`
if [[ $res == *"server"* ]]; then
Expand All @@ -53,17 +59,26 @@ do
fi
elif [[ $nid != $((ids)) ]]; then
echo "Expected server$nid got server$((ids))"
code=1
lcode=1
fi
nid=$((($ids + 1)%4))
if [[ $nid == 0 ]];then
nid=1
fi
else
code=1
lcode=1
fi
sleep 1
done
done
if [[ $lcode == 0 ]]
then
echo nat64tcp with ${servIP[k]} [OK]
else
echo nat64tcp with ${servIP[k]} [FAILED]
code=1
fi

done
sudo pkill -9 node
if [[ $code == 0 ]]
Expand Down
2 changes: 1 addition & 1 deletion cicd/tcplb/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ config_docker_host --host1 llb1 --host2 l3ep3 --ptype phy --addr 33.33.33.254/24

sleep 5
create_lb_rule llb1 20.20.20.1 --tcp=2020:8080 --endpoints=31.31.31.1:1,32.32.32.1:1,33.33.33.1:1
#create_lb_rule llb1 20.20.20.1 --tcp=2020:8080 --endpoints=31.31.31.1:1,32.32.32.1:1,33.33.33.1:1
create_lb_rule llb1 10.10.10.254 --tcp=2020:8080 --endpoints=31.31.31.1:1,32.32.32.1:1,33.33.33.1:1
19 changes: 13 additions & 6 deletions cicd/tcplb/validation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ $hexec l3ep3 node ../common/tcp_server.js server3 &

sleep 5
code=0
servIP=( "10.10.10.254" "20.20.20.1" )
servArr=( "server1" "server2" "server3" )
ep=( "31.31.31.1" "32.32.32.1" "33.33.33.1" )
j=0
Expand All @@ -33,25 +34,31 @@ do
sleep 1
done

for k in {0..1}
do
echo "Testing Service IP: ${servIP[k]}"
lcode=0
for i in {1..4}
do
for j in {0..2}
do
res=$($hexec l3h1 curl --max-time 10 -s 20.20.20.1:2020)
res=$($hexec l3h1 curl --max-time 10 -s ${servIP[k]}:2020)
echo $res
if [[ $res != "${servArr[j]}" ]]
then
code=1
lcode=1
fi
sleep 1
done
done
if [[ $code == 0 ]]
if [[ $lcode == 0 ]]
then
echo SCENARIO-tcplb [OK]
echo SCENARIO-tcplb with ${servIP[k]} [OK]
else
echo SCENARIO-tcplb [FAILED]
echo SCENARIO-tcplb with ${servIP[k]} [FAILED]
code=1
fi
done

sudo killall -9 node 2>&1 > /dev/null
exit $code