From da23de44030f56509b15af91900c9fe1c82bd6eb Mon Sep 17 00:00:00 2001 From: Trekkie Coder Date: Wed, 2 Oct 2024 11:29:49 +0900 Subject: [PATCH] gh-810 fixes for LC selection and added more tests to LC selftests --- cicd/tcplblc/validation.sh | 26 ++++++++++++++++++++++++-- loxilb-ebpf | 2 +- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/cicd/tcplblc/validation.sh b/cicd/tcplblc/validation.sh index c3686437..f388e835 100755 --- a/cicd/tcplblc/validation.sh +++ b/cicd/tcplblc/validation.sh @@ -50,7 +50,10 @@ do done done -$hexec l3h1 nohup nc -d ${servIP[0]} 2020 & +$hexec l3h1 nohup nc -d ${servIP[0]} 2020 >/dev/null 2>&1 & +$hexec l3h1 nohup nc -d ${servIP[0]} 2020 >/dev/null 2>&1 & +$hexec l3h1 nohup nc -d ${servIP[0]} 2020 >/dev/null 2>&1 & +$hexec l3h1 nohup nc -d ${servIP[0]} 2020 >/dev/null 2>&1 & sleep 5 echo "Testing Service IP: ${servIP[0]}" @@ -69,6 +72,25 @@ do done done +$hexec l3h1 nohup nc -d ${servIP[0]} 2020 >/dev/null 2>&1 & +sleep 5 + +echo "Testing Service IP: ${servIP[0]}" +lcode=0 +for i in {1..4} +do +for j in {0..2} +do + res=$($hexec l3h1 curl --max-time 10 -s ${servIP[0]}:2020) + echo $res + if [[ $res != "server3" ]] + then + lcode=1 + fi + sleep 1 +done +done + if [[ $lcode == 0 ]] then echo SCENARIO-tcplb with least-connection [OK] @@ -77,8 +99,8 @@ else code=1 fi -sudo killall -9 node 2>&1 > /dev/null sudo killall -9 nc 2>&1 > /dev/null +sudo killall -9 node 2>&1 > /dev/null rm -f nohup.out exit $code diff --git a/loxilb-ebpf b/loxilb-ebpf index 9e7d51b1..52d52aac 160000 --- a/loxilb-ebpf +++ b/loxilb-ebpf @@ -1 +1 @@ -Subproject commit 9e7d51b121b5f49a6cd477bf521ab63c3f9587d7 +Subproject commit 52d52aac19b6d4ff05437a86e29445a49ddcc5e4