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

SCTP Multihoming test case scripts fixed #899

Merged
merged 2 commits into from
Dec 5, 2024
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
38 changes: 24 additions & 14 deletions cicd/sctpmh-seagull/check_ha.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,15 @@ function restart_mloxilb() {
ka=" --ka=172.17.0.2:172.17.0.3"
fi
echo "Restarting MASTER: $master"
pid=$(docker exec -i $master ps -aef | grep $pat | xargs | cut -d ' ' -f 2)
#pid=$(docker exec -i $master ps -aef | grep $pat | xargs | cut -d ' ' -f 2)
pid=$(ps -aef | grep $pat | xargs | cut -d ' ' -f 2)
echo "Killing $pid" >&2
docker exec -dt $master kill -9 $pid
#docker exec -dt $master kill -9 $pid
sudo kill -9 $pid
docker exec -dt $master ip link del llb0
docker exec -dt $master nohup /root/loxilb-io/loxilb/loxilb $copts $self $ka > /dev/null &
pid=$(docker exec -i $master ps -aef | grep $pat | xargs | cut -d ' ' -f 2)
docker exec -dt $master /root/loxilb-io/loxilb/loxilb $copts $self $ka
#pid=$(docker exec -i $master ps -aef | grep $pat | xargs | cut -d ' ' -f 2)
pid=$(ps -aef | grep $pat | xargs | cut -d ' ' -f 2)
echo "New loxilb pid: $pid" >&2
}

Expand All @@ -112,23 +115,30 @@ function restart_loxilbs() {
bka=" --ka=172.17.0.3:172.17.0.2"
fi
echo "Restarting $master"
pid=$(docker exec -i $master ps -aef | grep $mpat | xargs | cut -d ' ' -f 2)
echo "Killing $mpid" >&2
docker exec -dt $master kill -9 $pid
pid=$(ps -aef | grep $mpat | xargs | cut -d ' ' -f 2)
#pid=$(docker exec -i $master ps -aef | grep $mpat | xargs | cut -d ' ' -f 2)
echo "Killing $pid" >&2
#docker exec -dt $master kill -9 $pid
sudo kill -9 $pid
docker exec -dt $master ip link del llb0
docker exec -dt $master nohup /root/loxilb-io/loxilb/loxilb $mcopts $mself $mka > /dev/null &
pid=$(docker exec -i $master ps -aef | grep $mpat | xargs | cut -d ' ' -f 2)
echo "/root/loxilb-io/loxilb/loxilb $mcopts $mself $mka" >&2
docker exec -dt $master /root/loxilb-io/loxilb/loxilb $mcopts $mself $mka
pid=$(ps -aef | grep $mpat | xargs | cut -d ' ' -f 2)
#pid=$(docker exec -i $master ps -aef | grep $mpat | xargs | cut -d ' ' -f 2)
echo "New loxilb pid: $pid" >&2

echo "Restarting $backup"
pid=$(docker exec -i $backup ps -aef | grep $bpat | xargs | cut -d ' ' -f 2)
pid=$(ps -aef | grep $bpat | xargs | cut -d ' ' -f 2)
#pid=$(docker exec -i $backup ps -aef | grep $bpat | xargs | cut -d ' ' -f 2)
echo "Killing $pid" >&2
docker exec -dt $backup kill -9 $pid
#docker exec -dt $backup kill -9 $pid
sudo kill -9 $pid
docker exec -dt $backup ip link del llb0
docker exec -dt $backup nohup /root/loxilb-io/loxilb/loxilb $bcopts $bself $bka > /dev/null &
pid=$(docker exec -i $backup ps -aef | grep $bpat | xargs | cut -d ' ' -f 2)
echo "/root/loxilb-io/loxilb/loxilb $bcopts $bself $bka" >&2
docker exec -dt $backup /root/loxilb-io/loxilb/loxilb $bcopts $bself $bka
#pid=$(docker exec -i $backup ps -aef | grep $bpat | xargs | cut -d ' ' -f 2)
pid=$(ps -aef | grep $bpat | xargs | cut -d ' ' -f 2)
echo "New loxilb pid: $pid" >&2

}


2 changes: 1 addition & 1 deletion cicd/sctpmh-seagull/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ source /vagrant/common.sh
echo "#########################################"
echo "Spawning all hosts"
echo "#########################################"

sudo sysctl net.ipv4.conf.all.arp_accept=1
spawn_docker_host --dock-type loxilb --dock-name llb1 --with-ka in
spawn_docker_host --dock-type loxilb --dock-name llb2 --with-ka in
spawn_docker_host --dock-type seahost --dock-name ep1
Expand Down
6 changes: 3 additions & 3 deletions cicd/sctpmh-seagull/validation2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ for((i=0;i<5;i++)) do
echo -e "\n\n"
$dexec $master loxicmd get ct --servName=sctpmh1
echo -e "\n"
p1c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh1 | grep "20.20.20.1 | 1.1.1.1" | xargs | cut -d '|' -f 10)
p2c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh1 | grep "21.21.21.1 | 2.2.2.1" | xargs | cut -d '|' -f 10)
p3c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh1 | grep "22.22.22.1 | 1.1.1.1" | xargs | cut -d '|' -f 10)
p1c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh1 | grep "20.20.20.1 | 1.1.1.1" | xargs | cut -d '|' -f 11)
p2c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh1 | grep "21.21.21.1 | 2.2.2.1" | xargs | cut -d '|' -f 11)
p3c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh1 | grep "22.22.22.1 | 1.1.1.1" | xargs | cut -d '|' -f 11)

echo "Counters: $p1c_new $p2c_new $p3c_new"

Expand Down
8 changes: 4 additions & 4 deletions cicd/sctpmh-seagull/validation3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ for((i=0;i<35;i++)) do
echo -e "\n\n"
$dexec $master loxicmd get ct --servName=sctpmh1
echo -e "\n"
p1c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh1 | grep "20.20.20.1 | 1.1.1.1" | xargs | cut -d '|' -f 10)
p2c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh1 | grep "21.21.21.1 | 2.2.2.1" | xargs | cut -d '|' -f 10)
p3c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh1 | grep "22.22.22.1 | 1.1.1.1" | xargs | cut -d '|' -f 10)
p1c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh1 | grep "20.20.20.1 | 1.1.1.1" | xargs | cut -d '|' -f 11)
p2c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh1 | grep "21.21.21.1 | 2.2.2.1" | xargs | cut -d '|' -f 11)
p3c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh1 | grep "22.22.22.1 | 1.1.1.1" | xargs | cut -d '|' -f 11)

echo "Counters: $p1c_new $p2c_new $p3c_new"

Expand All @@ -62,7 +62,7 @@ for((i=0;i<35;i++)) do
echo -e "Turning off this path from User->LB\n"
$hexec user ip link set euserr1 down;
down=1
p1c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh1 | grep "20.20.20.1 | 1.1.1.1" | xargs | cut -d '|' -f 10)
p1c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh1 | grep "20.20.20.1 | 1.1.1.1" | xargs | cut -d '|' -f 11)
else
if [[ $down == 1 ]]; then
p1dok=1
Expand Down
6 changes: 3 additions & 3 deletions cicd/sctpmh-seagull/validation4.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ for((i=0;i<35;i++)) do
echo -e "\n"
$dexec $master loxicmd get ct --servName=sctpmh2
echo -e "\n"
p1c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh2 | grep "133.133.133.1 | 31.31.31.1" | xargs | cut -d '|' -f 10)
p2c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh2 | grep "134.134.134.1 | 32.32.32.1" | xargs | cut -d '|' -f 10)
p3c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh2 | grep "135.135.135.1 | 31.31.31.1" | xargs | cut -d '|' -f 10)
p1c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh2 | grep "133.133.133.1 | 31.31.31.1" | xargs | cut -d '|' -f 11)
p2c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh2 | grep "134.134.134.1 | 32.32.32.1" | xargs | cut -d '|' -f 11)
p3c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh2 | grep "135.135.135.1 | 31.31.31.1" | xargs | cut -d '|' -f 11)

echo "Counters: $p1c_new $p2c_new $p3c_new"

Expand Down
6 changes: 3 additions & 3 deletions cicd/sctpmh-seagull/validation5.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ for((i=0;i<15;i++)) do

$dexec $master loxicmd get ct --servName=sctpmh1
echo -e "\n"
p1c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh1 | grep "20.20.20.1 | 1.1.1.1" | xargs | cut -d '|' -f 10)
p2c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh1 | grep "21.21.21.1 | 2.2.2.1" | xargs | cut -d '|' -f 10)
p3c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh1 | grep "22.22.22.1 | 1.1.1.1" | xargs | cut -d '|' -f 10)
p1c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh1 | grep "20.20.20.1 | 1.1.1.1" | xargs | cut -d '|' -f 11)
p2c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh1 | grep "21.21.21.1 | 2.2.2.1" | xargs | cut -d '|' -f 11)
p3c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh1 | grep "22.22.22.1 | 1.1.1.1" | xargs | cut -d '|' -f 11)

echo "Counters: $p1c_new $p2c_new $p3c_new"
if [[ $p1c_new -gt $p1c_old ]]; then
Expand Down
6 changes: 3 additions & 3 deletions cicd/sctpmh-seagull/validation6.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ for((i=0;i<15;i++)) do
echo -e "\n"
$dexec $master loxicmd get ct --servName=sctpmh2
echo -e "\n"
p1c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh2 | grep "133.133.133.1 | 31.31.31.1" | xargs | cut -d '|' -f 10)
p2c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh2 | grep "134.134.134.1 | 32.32.32.1" | xargs | cut -d '|' -f 10)
p3c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh2 | grep "135.135.135.1 | 31.31.31.1" | xargs | cut -d '|' -f 10)
p1c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh2 | grep "133.133.133.1 | 31.31.31.1" | xargs | cut -d '|' -f 11)
p2c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh2 | grep "134.134.134.1 | 32.32.32.1" | xargs | cut -d '|' -f 11)
p3c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh2 | grep "135.135.135.1 | 31.31.31.1" | xargs | cut -d '|' -f 11)


echo "Counters: $p1c_new $p2c_new $p3c_new"
Expand Down
38 changes: 24 additions & 14 deletions cicd/sctpmh/check_ha.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,15 @@ function restart_mloxilb() {
ka=" --ka=172.17.0.2:172.17.0.3"
fi
echo "Restarting MASTER: $master"
pid=$(docker exec -i $master ps -aef | grep $pat | xargs | cut -d ' ' -f 2)
#pid=$(docker exec -i $master ps -aef | grep $pat | xargs | cut -d ' ' -f 2)
pid=$(ps -aef | grep $pat | xargs | cut -d ' ' -f 2)
echo "Killing $pid" >&2
docker exec -dt $master kill -9 $pid
#docker exec -dt $master kill -9 $pid
sudo kill -9 $pid
docker exec -dt $master ip link del llb0
docker exec -dt $master nohup /root/loxilb-io/loxilb/loxilb $copts $self $ka > /dev/null &
pid=$(docker exec -i $master ps -aef | grep $pat | xargs | cut -d ' ' -f 2)
docker exec -dt $master /root/loxilb-io/loxilb/loxilb $copts $self $ka
#pid=$(docker exec -i $master ps -aef | grep $pat | xargs | cut -d ' ' -f 2)
pid=$(ps -aef | grep $pat | xargs | cut -d ' ' -f 2)
echo "New loxilb pid: $pid" >&2
}

Expand All @@ -112,23 +115,30 @@ function restart_loxilbs() {
bka=" --ka=172.17.0.3:172.17.0.2"
fi
echo "Restarting $master"
pid=$(docker exec -i $master ps -aef | grep $mpat | xargs | cut -d ' ' -f 2)
echo "Killing $mpid" >&2
docker exec -dt $master kill -9 $pid
pid=$(ps -aef | grep $mpat | xargs | cut -d ' ' -f 2)
#pid=$(docker exec -i $master ps -aef | grep $mpat | xargs | cut -d ' ' -f 2)
echo "Killing $pid" >&2
#docker exec -dt $master kill -9 $pid
sudo kill -9 $pid
docker exec -dt $master ip link del llb0
docker exec -dt $master nohup /root/loxilb-io/loxilb/loxilb $mcopts $mself $mka > /dev/null &
pid=$(docker exec -i $master ps -aef | grep $mpat | xargs | cut -d ' ' -f 2)
echo "/root/loxilb-io/loxilb/loxilb $mcopts $mself $mka" >&2
docker exec -dt $master /root/loxilb-io/loxilb/loxilb $mcopts $mself $mka
pid=$(ps -aef | grep $mpat | xargs | cut -d ' ' -f 2)
#pid=$(docker exec -i $master ps -aef | grep $mpat | xargs | cut -d ' ' -f 2)
echo "New loxilb pid: $pid" >&2

echo "Restarting $backup"
pid=$(docker exec -i $backup ps -aef | grep $bpat | xargs | cut -d ' ' -f 2)
pid=$(ps -aef | grep $bpat | xargs | cut -d ' ' -f 2)
#pid=$(docker exec -i $backup ps -aef | grep $bpat | xargs | cut -d ' ' -f 2)
echo "Killing $pid" >&2
docker exec -dt $backup kill -9 $pid
#docker exec -dt $backup kill -9 $pid
sudo kill -9 $pid
docker exec -dt $backup ip link del llb0
docker exec -dt $backup nohup /root/loxilb-io/loxilb/loxilb $bcopts $bself $bka > /dev/null &
pid=$(docker exec -i $backup ps -aef | grep $bpat | xargs | cut -d ' ' -f 2)
echo "/root/loxilb-io/loxilb/loxilb $bcopts $bself $bka" >&2
docker exec -dt $backup /root/loxilb-io/loxilb/loxilb $bcopts $bself $bka
#pid=$(docker exec -i $backup ps -aef | grep $bpat | xargs | cut -d ' ' -f 2)
pid=$(ps -aef | grep $bpat | xargs | cut -d ' ' -f 2)
echo "New loxilb pid: $pid" >&2

}


2 changes: 1 addition & 1 deletion cicd/sctpmh/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ source ../common.sh
echo "#########################################"
echo "Spawning all hosts"
echo "#########################################"

sudo sysctl net.ipv4.conf.all.arp_accept=1
spawn_docker_host --dock-type loxilb --dock-name llb1 --with-ka in
spawn_docker_host --dock-type loxilb --dock-name llb2 --with-ka in
spawn_docker_host --dock-type host --dock-name ep1
Expand Down
2 changes: 1 addition & 1 deletion cicd/sctpmh/validation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ for((j=0,i=1; i<=6; i++, j++)); do
fi
echo -e "\n\n\n$border\n\n"

sleep 30
sleep 60
done

echo -e "\n\n\n$border\n"
Expand Down
6 changes: 3 additions & 3 deletions cicd/sctpmh/validation2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ for((i=0;i<100;i++)) do
fi
$dexec $master loxicmd get ct --servName=sctpmh1
echo -e "\n"
p1c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh1 | grep "123.123.123.1 | 1.1.1.1" | xargs | cut -d '|' -f 10)
p2c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh1 | grep "124.124.124.1 | 2.2.2.1" | xargs | cut -d '|' -f 10)
p3c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh1 | grep "125.125.125.1 | 1.1.1.1" | xargs | cut -d '|' -f 10)
p1c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh1 | grep "123.123.123.1 | 1.1.1.1" | xargs | cut -d '|' -f 11)
p2c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh1 | grep "124.124.124.1 | 2.2.2.1" | xargs | cut -d '|' -f 11)
p3c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh1 | grep "125.125.125.1 | 1.1.1.1" | xargs | cut -d '|' -f 11)

echo "Counters: $p1c_new $p2c_new $p3c_new"

Expand Down
12 changes: 6 additions & 6 deletions cicd/sctpmh/validation3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ echo -e "\nTraffic Flow: User -> LB -> EP "
$hexec ep1 sctp_test -H 31.31.31.1 -P 9999 -l > ep1.out &
sleep 2

$hexec user stdbuf -oL sctp_test -H 1.1.1.1 -B 2.2.2.1 -P 20000 -h $extIP -p $port -s -c 6 -x 1000 > user.out &
$hexec user stdbuf -oL sctp_test -H 1.1.1.1 -B 2.2.2.1 -P 20000 -h $extIP -p $port -s -c 6 -x 5000 > user.out &
#Path counters
p1c_old=0
p1c_new=0
Expand All @@ -32,17 +32,17 @@ code=0
sleep 5

for((i=0;i<200;i++)) do
fin=`tail -n 100 user.out | grep "Client: Sending packets.(1000/1000)"`
fin=`tail -n 100 user.out | grep "Client: Sending packets.(5000/5000)"`
if [[ ! -z $fin ]]; then
fin=1
echo "sctp_test done."
break;
fi
$dexec $master loxicmd get ct --servName=sctpmh1
echo -e "\n"
p1c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh1 | grep "123.123.123.1 | 1.1.1.1" | xargs | cut -d '|' -f 10)
p2c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh1 | grep "124.124.124.1 | 2.2.2.1" | xargs | cut -d '|' -f 10)
p3c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh1 | grep "125.125.125.1 | 1.1.1.1" | xargs | cut -d '|' -f 10)
p1c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh1 | grep "123.123.123.1 | 1.1.1.1" | xargs | cut -d '|' -f 11)
p2c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh1 | grep "124.124.124.1 | 2.2.2.1" | xargs | cut -d '|' -f 11)
p3c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh1 | grep "125.125.125.1 | 1.1.1.1" | xargs | cut -d '|' -f 11)

echo "Counters: $p1c_new $p2c_new $p3c_new"

Expand All @@ -56,7 +56,7 @@ for((i=0;i<200;i++)) do
echo "Turning off this path from User->LB"
$hexec user ip link set euserr1 down;
down=1
p1c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh1 | grep "123.123.123.1 | 1.1.1.1" | xargs | cut -d '|' -f 10)
p1c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh1 | grep "123.123.123.1 | 1.1.1.1" | xargs | cut -d '|' -f 11)
else
if [[ $down == 1 ]]; then
p1dok=1
Expand Down
12 changes: 6 additions & 6 deletions cicd/sctpmh/validation4.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ echo -e "\nTraffic Flow: EP ---> LB ---> User"
$hexec user sctp_test -H 0.0.0.0 -P 9999 -l > user.out &
sleep 2

$hexec ep1 stdbuf -oL sctp_test -H 31.31.31.1 -B 32.32.32.1 -P 20000 -h $extIP -p $port -s -c 6 -x 1000 > ep1.out &
$hexec ep1 stdbuf -oL sctp_test -H 31.31.31.1 -B 32.32.32.1 -P 20000 -h $extIP -p $port -s -c 6 -x 5000 > ep1.out &

#Path counters
p1c_old=0
Expand All @@ -30,17 +30,17 @@ code=0
sleep 2

for((i=0;i<200;i++)) do
fin=`tail -n 100 ep1.out | grep "Client: Sending packets.(1000/1000)"`
fin=`tail -n 100 ep1.out | grep "Client: Sending packets.(5000/5000)"`
if [[ ! -z $fin ]]; then
fin=1
echo "sctp_test done."
break;
fi
$dexec $master loxicmd get ct --servName=sctpmh2
echo -e "\n"
p1c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh2 | grep "133.133.133.1 | 31.31.31.1" | xargs | cut -d '|' -f 10)
p2c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh2 | grep "134.134.134.1 | 32.32.32.1" | xargs | cut -d '|' -f 10)
p3c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh2 | grep "135.135.135.1 | 31.31.31.1" | xargs | cut -d '|' -f 10)
p1c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh2 | grep "133.133.133.1 | 31.31.31.1" | xargs | cut -d '|' -f 11)
p2c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh2 | grep "134.134.134.1 | 32.32.32.1" | xargs | cut -d '|' -f 11)
p3c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh2 | grep "135.135.135.1 | 31.31.31.1" | xargs | cut -d '|' -f 11)

echo "Counters: $p1c_new $p2c_new $p3c_new"

Expand All @@ -54,7 +54,7 @@ for((i=0;i<200;i++)) do
echo -e "Turning off this path at User.\nEP----->LB--x-->User"
$hexec user ip link set euserr1 down;
down=1
p1c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh2 | grep "133.133.133.1 | 31.31.31.1" | xargs | cut -d '|' -f 10)
p1c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh2 | grep "133.133.133.1 | 31.31.31.1" | xargs | cut -d '|' -f 11)
else
if [[ $down == 1 ]]; then
p1dok=1
Expand Down
10 changes: 5 additions & 5 deletions cicd/sctpmh/validation5.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ sudo pkill sctp_test
$hexec ep1 sctp_test -H 31.31.31.1 -P 9999 -l > ep1.out &
sleep 2

$hexec user stdbuf -oL sctp_test -H 1.1.1.1 -B 2.2.2.1 -P 20000 -h $extIP -p $port -s -c 6 -x 10000 > user.out &
$hexec user stdbuf -oL sctp_test -H 1.1.1.1 -B 2.2.2.1 -P 20000 -h $extIP -p $port -s -c 6 -x 30000 > user.out &

#Path counters
p1c_old=0
Expand All @@ -34,7 +34,7 @@ code=0
nsyncOk=0

for((i=0;i<400;i++)) do
fin=`tail -n 100 user.out | grep "Client: Sending packets.(10000/10000)"`
fin=`tail -n 100 user.out | grep "Client: Sending packets.(30000/30000)"`
if [[ ! -z $fin ]]; then
fin=1
echo "sctp_test done."
Expand All @@ -51,9 +51,9 @@ for((i=0;i<400;i++)) do
fi
$dexec $master loxicmd get ct --servName=sctpmh1
echo -e "\n"
p1c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh1 | grep "123.123.123.1 | 1.1.1.1" | xargs | cut -d '|' -f 10)
p2c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh1 | grep "124.124.124.1 | 2.2.2.1" | xargs | cut -d '|' -f 10)
p3c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh1 | grep "125.125.125.1 | 1.1.1.1" | xargs | cut -d '|' -f 10)
p1c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh1 | grep "123.123.123.1 | 1.1.1.1" | xargs | cut -d '|' -f 11)
p2c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh1 | grep "124.124.124.1 | 2.2.2.1" | xargs | cut -d '|' -f 11)
p3c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh1 | grep "125.125.125.1 | 1.1.1.1" | xargs | cut -d '|' -f 11)

echo "Counters: $p1c_new $p2c_new $p3c_new"
if [[ $p1c_new -gt $p1c_old ]]; then
Expand Down
Loading
Loading