Skip to content

Commit

Permalink
Merge pull request #632 from TrekkieCoder/main
Browse files Browse the repository at this point in the history
cicd: fixes for redhat runner
  • Loading branch information
UltraInstinct14 authored Apr 11, 2024
2 parents a5c8d51 + 2f4b944 commit d9fac9e
Show file tree
Hide file tree
Showing 7 changed files with 63 additions and 26 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/tcp-sanity-rh9.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,36 @@ jobs:
./validation.sh
./rmconfig.sh
cd -
- run: |
cd cicd/tcplbmark/
./config.sh
./validation.sh
./rmconfig.sh
cd -
- run: |
cd cicd/tcplbdsr1/
./config.sh
./validation.sh
./rmconfig.sh
cd -
- run: |
cd cicd/tcplbdsr2/
./config.sh
./validation.sh
./rmconfig.sh
cd -
- run: |
cd cicd/tcplbl3dsr/
./config.sh
./validation.sh
./rmconfig.sh
cd -
- run: |
cd cicd/tcplbhash/
./config.sh
./validation.sh
./rmconfig.sh
cd -
- name: Clean test-bed
if: success() || failure()
run: |
Expand Down
6 changes: 5 additions & 1 deletion cicd/common/tcp_server.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
var http = require('http');
var port = 8080
if (process.argv[3]) {
port = 2020
}
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/html'});
res.end(process.argv[2]);
}).listen(8080);
}).listen(port);
11 changes: 6 additions & 5 deletions cicd/sctplb/validation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ echo SCENARIO-sctplb
servArr=( "server1" "server2" "server3" )
ep=( "31.31.31.1" "32.32.32.1" "33.33.33.1" )

$hexec l3ep1 ../common/sctp_server ${ep[0]} 8080 server1 >/dev/null 2>&1 &
$hexec l3ep2 ../common/sctp_server ${ep[1]} 8080 server2 >/dev/null 2>&1 &
$hexec l3ep3 ../common/sctp_server ${ep[2]} 8080 server3 >/dev/null 2>&1 &
$hexec l3ep1 socat -v -T0.5 sctp-l:8080,reuseaddr,fork system:"echo 'server1'; cat" >/dev/null 2>&1 &
$hexec l3ep2 socat -v -T0.5 sctp-l:8080,reuseaddr,fork system:"echo 'server2'; cat" >/dev/null 2>&1 &
$hexec l3ep3 socat -v -T0.5 sctp-l:8080,reuseaddr,fork system:"echo 'server3'; cat" >/dev/null 2>&1 &

sleep 5
code=0
j=0
waitCount=0
while [ $j -le 2 ]
do
res=$($hexec l3h1 timeout 10 ../common/sctp_client 10.10.10.1 0 ${ep[j]} 8080)
res=$($hexec l3h1 timeout 10 ../common/sctp_socat_client 10.10.10.1 0 ${ep[j]} 8080)
#echo $res
if [[ $res == "${servArr[j]}" ]]
then
Expand All @@ -40,7 +40,7 @@ for i in {1..4}
do
for j in {0..2}
do
res=$($hexec l3h1 timeout 10 ../common/sctp_client 10.10.10.1 0 20.20.20.1 2020)
res=$($hexec l3h1 timeout 10 ../common/sctp_socat_client 10.10.10.1 0 20.20.20.1 2020)
echo -e $res
if [[ $res != "${servArr[j]}" ]]
then
Expand All @@ -49,6 +49,7 @@ do
sleep 1
done
done
sudo pkill socat >/dev/null 2>&1
sudo pkill sctp_server >/dev/null 2>&1
if [[ $code == 0 ]]
then
Expand Down
20 changes: 10 additions & 10 deletions cicd/sctplbdsr/validation.sh
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
#!/bin/bash
source ../common.sh
echo SCENARIO-sctplbdsr
#$hexec l3ep1 socat -v -T0.5 sctp-l:2020,reuseaddr,fork system:"echo 'server1'; cat" >/dev/null 2>&1 &
#$hexec l3ep2 socat -v -T0.5 sctp-l:2020,reuseaddr,fork system:"echo 'server2'; cat" >/dev/null 2>&1 &
#$hexec l3ep3 socat -v -T0.5 sctp-l:2020,reuseaddr,fork system:"echo 'server3'; cat" >/dev/null 2>&1 &

servArr=( "server1" "server2" "server3" )
ep=( "31.31.31.1" "32.32.32.1" "33.33.33.1" )

$hexec l3ep1 ../common/sctp_server 20.20.20.1,31.31.31.1 2020 server1 >/dev/null 2>&1 &
$hexec l3ep2 ../common/sctp_server 20.20.20.1,32.32.32.1 2020 server2 >/dev/null 2>&1 &
$hexec l3ep3 ../common/sctp_server 20.20.20.1,33.33.33.1 2020 server3 >/dev/null 2>&1 &
$hexec l3ep1 socat -v -T0.5 sctp-l:2020,reuseaddr,fork system:"echo 'server1'; cat" >/dev/null 2>&1 &
$hexec l3ep2 socat -v -T0.5 sctp-l:2020,reuseaddr,fork system:"echo 'server2'; cat" >/dev/null 2>&1 &
$hexec l3ep3 socat -v -T0.5 sctp-l:2020,reuseaddr,fork system:"echo 'server3'; cat" >/dev/null 2>&1 &

#$hexec l3ep1 ../common/sctp_server 20.20.20.1,31.31.31.1 2020 server1 >/dev/null 2>&1 &
#$hexec l3ep2 ../common/sctp_server 20.20.20.1,32.32.32.1 2020 server2 >/dev/null 2>&1 &
#$hexec l3ep3 ../common/sctp_server 20.20.20.1,33.33.33.1 2020 server3 >/dev/null 2>&1 &

sleep 5
code=0
Expand All @@ -19,7 +19,7 @@ waitCount=0
while [ $j -le 2 ]
do
#res=$($hexec l3h1 socat -T10 - SCTP:${ep[j]}:2020)
res=$($hexec l3h1 timeout 10 ../common/sctp_client 10.10.10.1 2010 ${ep[j]} 2020)
res=$($hexec l3h1 timeout 10 ../common/sctp_socat_client 10.10.10.1 2010 ${ep[j]} 2020)
echo $res
if [[ $res == "${servArr[j]}" ]]
then
Expand Down Expand Up @@ -50,7 +50,7 @@ sleep 5
nid=0
for j in {0..2}
do
res=$($hexec l3h1 timeout 10 ../common/sctp_client 10.10.10.1 2010 20.20.20.1 2020)
res=$($hexec l3h1 timeout 10 ../common/sctp_socat_client 10.10.10.1 2010 20.20.20.1 2020)
echo $res
if [[ $exp == "" ]]
then
Expand All @@ -69,6 +69,6 @@ else
echo SCENARIO-sctplbdsr [FAILED]
fi

#sudo killall -9 socat >> /dev/null 2>&1
sudo pkill -9 socat >> /dev/null 2>&1
sudo pkill -9 sctp_server >/dev/null 2>&1
exit $code
9 changes: 5 additions & 4 deletions cicd/sctponearm/validation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ source ../common.sh
echo SCENARIO-SCTP-ONEARM
servArr=( "server1" "server2" )
ep=( "10.75.188.218" "10.75.188.220" )
$hexec ep1 ../common/sctp_server ${ep[0]} 38412 server1 >/dev/null 2>&1 &
$hexec ep2 ../common/sctp_server ${ep[1]} 38412 server2 >/dev/null 2>&1 &
$hexec ep1 socat -v -T0.5 sctp-l:38412,reuseaddr,fork system:"echo 'server1'; cat" >/dev/null 2>&1 &
$hexec ep2 socat -v -T0.5 sctp-l:38412,reuseaddr,fork system:"echo 'server2'; cat" >/dev/null 2>&1 &

sleep 60
$dexec llb1 loxicmd get ep
Expand All @@ -18,7 +18,7 @@ j=2
waitCount=0
while [ $j -le 1 ]
do
res=$($hexec c1 timeout 10 ../common/sctp_client 10.75.191.224 0 ${ep[j]} 38412)
res=$($hexec c1 timeout 10 ../common/sctp_socat_client 10.75.191.224 0 ${ep[j]} 38412)
#echo $res
if [[ $res == "${servArr[j]}" ]]
then
Expand All @@ -43,7 +43,7 @@ for i in {1..4}
do
for j in {0..1}
do
res=$($hexec c1 timeout 10 ../common/sctp_client 10.75.191.224 0 123.123.123.1 38412)
res=$($hexec c1 timeout 10 ../common/sctp_socat_client 10.75.191.224 0 123.123.123.1 38412)
echo -e $res
if [[ $res != "${servArr[j]}" ]]
then
Expand All @@ -58,6 +58,7 @@ then
else
echo SCENARIO-SCTP-ONEARM [FAILED]
fi
sudo pkill -9 -x socat >/dev/null 2>&1
sudo pkill -9 -x sctp_server >/dev/null 2>&1
exit $code

11 changes: 6 additions & 5 deletions cicd/sctptunlb/validation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ servArr=( "server1" "server2" "server3" )
ep=( "25.25.25.1" "26.26.26.1" "27.27.27.1" )
ueIP=( "" "32.32.32.1" "31.31.31.1" )

$hexec l3e1 ../common/sctp_server ${ep[0]} 8080 server1 >/dev/null 2>&1 &
$hexec l3e2 ../common/sctp_server ${ep[1]} 8080 server2 >/dev/null 2>&1 &
$hexec l3e3 ../common/sctp_server ${ep[2]} 8080 server3 >/dev/null 2>&1 &
$hexec l3e1 socat -v -T0.5 sctp-l:8080,reuseaddr,fork system:"echo 'server1'; cat" >/dev/null 2>&1 &
$hexec l3e2 socat -v -T0.5 sctp-l:8080,reuseaddr,fork system:"echo 'server2'; cat" >/dev/null 2>&1 &
$hexec l3e3 socat -v -T0.5 sctp-l:8080,reuseaddr,fork system:"echo 'server3'; cat" >/dev/null 2>&1 &

sleep 5
code=0
Expand All @@ -16,7 +16,7 @@ waitCount=0
while [ $j -le 2 ]
do
#res=$($hexec ue1 curl ${ep[j]}:8080)
res=`$hexec h1 timeout 10 ../common/sctp_client 32.32.32.1 0 ${ep[j]} 8080`
res=`$hexec h1 timeout 10 ../common/sctp_socat_client 32.32.32.1 0 ${ep[j]} 8080`
#echo $res
if [[ $res == "${servArr[j]}" ]]
then
Expand All @@ -43,7 +43,7 @@ for i in {1..2}
do
for j in {0..2}
do
res=$($hexec h$k timeout 10 ../common/sctp_client ${ueIP[k]} 0 88.88.88.88 2020)
res=$($hexec h$k timeout 10 ../common/sctp_socat_client ${ueIP[k]} 0 88.88.88.88 2020)
echo -e $res
if [[ $res != "${servArr[j]}" ]]
then
Expand All @@ -70,5 +70,6 @@ else
echo SCENARIO-sctptunlb [FAILED]
fi
sudo pkill sctp_server >/dev/null 2>&1
sudo pkill socat >/dev/null 2>&1
exit $code

2 changes: 1 addition & 1 deletion loxilb-ebpf

0 comments on commit d9fac9e

Please sign in to comment.