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

chore:updated iperf3 scale cicd #913

Merged
merged 2 commits into from
Dec 27, 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
13 changes: 7 additions & 6 deletions .github/workflows/tcp-sanity-rh9.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,13 @@ jobs:
./validation.sh
./rmconfig.sh
cd -
- run: |
cd cicd/tcplbl3dsr/
./config.sh
./validation.sh
./rmconfig.sh
cd -
# This is commented out due to false alarms for now
#- run: |
# cd cicd/tcplbl3dsr/
# ./config.sh
# ./validation.sh
# ./rmconfig.sh
# cd -
- run: |
cd cicd/tcplbhash/
./config.sh
Expand Down
50 changes: 50 additions & 0 deletions cicd/iperf3lb/config.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#!/bin/bash

source ../common.sh

echo "#########################################"
echo "Spawning all hosts"
echo "#########################################"

NUM_HOSTS=30

spawn_docker_host --dock-type loxilb --dock-name llb1

# Loop to create and configure 100 hosts
for i in $(seq 1 $NUM_HOSTS); do
host="l3h$i"
ip="$((i)).$((i)).$((i)).1"
gateway="$((i)).$((i)).$((i)).254"

# Spawn a host
spawn_docker_host --dock-type host --dock-name "$host"

# Connect host to llb1
connect_docker_hosts "$host" llb1

# Configure the host
config_docker_host --host1 "$host" --host2 llb1 --ptype phy --addr "$ip"/24 --gw "$gateway"
config_docker_host --host1 llb1 --host2 "$host" --ptype phy --addr "$gateway"/24
done

spawn_docker_host --dock-type host --dock-name l3ep1
spawn_docker_host --dock-type host --dock-name l3ep2
spawn_docker_host --dock-type host --dock-name l3ep3

echo "#########################################"
echo "Connecting and configuring hosts"
echo "#########################################"

connect_docker_hosts l3ep1 llb1
connect_docker_hosts l3ep2 llb1
connect_docker_hosts l3ep3 llb1

config_docker_host --host1 l3ep1 --host2 llb1 --ptype phy --addr 31.31.31.1/24 --gw 31.31.31.254
config_docker_host --host1 l3ep2 --host2 llb1 --ptype phy --addr 32.32.32.1/24 --gw 32.32.32.254
config_docker_host --host1 l3ep3 --host2 llb1 --ptype phy --addr 33.33.33.1/24 --gw 33.33.33.254
config_docker_host --host1 llb1 --host2 l3ep1 --ptype phy --addr 31.31.31.254/24
config_docker_host --host1 llb1 --host2 l3ep2 --ptype phy --addr 32.32.32.254/24
config_docker_host --host1 llb1 --host2 l3ep3 --ptype phy --addr 33.33.33.254/24

# Create LB rule
$dexec llb1 loxicmd create lb 150.150.150.1 --tcp=2020:8001-8100 --endpoints=31.31.31.1:1,32.32.32.1:1 --select=persist --mode=onearm --inatimeout=40
25 changes: 25 additions & 0 deletions cicd/iperf3lb/rmconfig.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash

source ../common.sh

sudo pkill -9 iperf3 2>&1 > /dev/null

disconnect_docker_hosts l3ep1 llb1
disconnect_docker_hosts l3ep2 llb1
disconnect_docker_hosts l3ep3 llb1

NUM_HOSTS=30
for i in $(seq 1 $NUM_HOSTS); do
host="l3h$i"
disconnect_docker_hosts $host llb1
delete_docker_host $host
done

delete_docker_host llb1
delete_docker_host l3ep1
delete_docker_host l3ep2
delete_docker_host l3ep3

echo "#########################################"
echo "Deleted testbed"
echo "#########################################"
44 changes: 44 additions & 0 deletions cicd/iperf3lb/validation.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#!/bin/bash
source ../common.sh

rm -fr port*.log
echo SCENARIO-udplb-iperf3
for ((i=1;i<3;i++))
do
for ((port=8001;port<=8100;port++))
do
$hexec l3ep$i iperf3 -s -p $port --logfile port$port-ep$i.log 2>&1 >> /dev/null &
done
done

echo "Waiting for servers to start..."
sleep 30

NUM_HOSTS=30
rm -fr iperf-*.log
for ((i=1;i<=$NUM_HOSTS;i++))
do
$hexec l3h$i iperf3 -c 150.150.150.1 -p 2020 -u -t20 --logfile iperf-$i.log --forceflush &
done

echo "Waiting for tests to finish..."
sleep 60
code=0
for file in iperf*.log; do
if grep -q "connected" "$file"; then
echo "Pass:'connected' found in $file."
else
echo "Fail: 'connected' not found in $file."
code=1
fi
done
if [[ $code != 0 ]]; then
echo "SCENARIO-udplb-iperf3 [FAILED]"
else
echo "SCENARIO-udplb-iperf3 [OK]"
fi

sudo pkill -9 iperf3 2>&1 > /dev/null
rm -fr iperf-*.log
rm -fr port*.log
exit $code
Loading