diff --git a/.github/workflows/tcp-sanity-rh9.yml b/.github/workflows/tcp-sanity-rh9.yml index e50ad2575..767e26af4 100644 --- a/.github/workflows/tcp-sanity-rh9.yml +++ b/.github/workflows/tcp-sanity-rh9.yml @@ -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: | diff --git a/cicd/common/tcp_server.js b/cicd/common/tcp_server.js index ca6f6f588..0813382fd 100644 --- a/cicd/common/tcp_server.js +++ b/cicd/common/tcp_server.js @@ -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); diff --git a/cicd/sctplb/validation.sh b/cicd/sctplb/validation.sh index 2d36c99d5..d6a5c6b00 100755 --- a/cicd/sctplb/validation.sh +++ b/cicd/sctplb/validation.sh @@ -5,9 +5,9 @@ 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 @@ -15,7 +15,7 @@ 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 @@ -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 @@ -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 diff --git a/cicd/sctplbdsr/validation.sh b/cicd/sctplbdsr/validation.sh index 888259172..0e2a56daf 100755 --- a/cicd/sctplbdsr/validation.sh +++ b/cicd/sctplbdsr/validation.sh @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/cicd/sctponearm/validation.sh b/cicd/sctponearm/validation.sh index 9aae1d87d..fbf6df503 100755 --- a/cicd/sctponearm/validation.sh +++ b/cicd/sctponearm/validation.sh @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/cicd/sctptunlb/validation.sh b/cicd/sctptunlb/validation.sh index f9d2b7b37..06087f1a6 100755 --- a/cicd/sctptunlb/validation.sh +++ b/cicd/sctptunlb/validation.sh @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/loxilb-ebpf b/loxilb-ebpf index a5869d0af..70a193a85 160000 --- a/loxilb-ebpf +++ b/loxilb-ebpf @@ -1 +1 @@ -Subproject commit a5869d0af78252baff82f4193b28c545ca76ba87 +Subproject commit 70a193a85f89a7e8d008fdfb72773ab9e4c76c43