diff --git a/cicd/sctpmh-seagull/check_ha.sh b/cicd/sctpmh-seagull/check_ha.sh index f06e85953..b31574fb0 100644 --- a/cicd/sctpmh-seagull/check_ha.sh +++ b/cicd/sctpmh-seagull/check_ha.sh @@ -21,9 +21,10 @@ function check_ha() { else count=$(( $count + 1 )) if [[ $count -ge 20 ]]; then - echo "KA llb1-$status1, llb2-$status2 [NOK]" >&2 + echo "KA llb1-$status1, llb2-$status2 [NOK] - Exiting" >&2 exit 1; fi + echo "KA llb1-$status1, llb2-$status2 [NOK]" >&2 sleep 5 fi done @@ -34,7 +35,6 @@ function checkSync() { sync=0 while [[ $count -le 5 ]] ; do echo -e "\nStatus at MASTER:$master\n" >&2 - #$dexec $master loxicmd get ct | grep est >&2 ct=`$dexec $master loxicmd get ct | grep est` echo "${ct//'\n'/$'\n'}" >&2 diff --git a/cicd/sctpmh-seagull/common.sh b/cicd/sctpmh-seagull/common.sh index c5a28ac5f..d11adb0e3 100644 --- a/cicd/sctpmh-seagull/common.sh +++ b/cicd/sctpmh-seagull/common.sh @@ -76,7 +76,7 @@ spawn_docker_host() { fi shift 2 ;; - -d | --ka-config ) + -n | --ka-config ) kpath="$2" if [[ -z ${ka+x} ]]; then ka="in" @@ -87,6 +87,10 @@ spawn_docker_host() { extra_opts="$2" shift 2 ;; + -x | --docker-args) + docker_extra_opts="$2" + shift 2 + ;; -*|--*) echo "Unknown option $1" exit @@ -109,11 +113,11 @@ spawn_docker_host() { fi if [[ ! -z ${ka+x} ]]; then sudo mkdir -p /etc/shared/$dname/ - docker run -u root --cap-add SYS_ADMIN --restart unless-stopped --privileged -dt --pid=host --cgroupns=host --entrypoint /bin/bash $bgp_conf -v /dev/log:/dev/log -v /etc/shared/$dname:/etc/shared $loxilb_config --name $dname $lxdocker + docker run -u root --cap-add SYS_ADMIN --restart unless-stopped --privileged -dt $docker_extra_opts --entrypoint /bin/bash $bgp_conf -v /dev/log:/dev/log -v /etc/shared/$dname:/etc/shared $loxilb_config --name $dname $lxdocker get_llb_peerIP $dname docker exec -dt $dname /root/loxilb-io/loxilb/loxilb $bgp_opts $cluster_opts $ka_opts $extra_opts else - docker run -u root --cap-add SYS_ADMIN --restart unless-stopped --privileged -dt --pid=host --cgroupns=host --entrypoint /bin/bash $bgp_conf -v /dev/log:/dev/log $loxilb_config --name $dname $lxdocker $bgp_opts + docker run -u root --cap-add SYS_ADMIN --restart unless-stopped --privileged -dt $docker_extra_opts --entrypoint /bin/bash $bgp_conf -v /dev/log:/dev/log $loxilb_config --name $dname $lxdocker $bgp_opts docker exec -dt $dname /root/loxilb-io/loxilb/loxilb $bgp_opts $cluster_opts $extra_opts fi elif [[ "$dtype" == "host" ]]; then @@ -553,6 +557,10 @@ function create_lb_rule() { echo "$1: loxicmd create lb ${args[*]}" $dexec $1 loxicmd create lb ${args[*]} + if [[ ${args[*]} == *"--mode=fullproxy"* ]]; then + return + fi + hook=$($dexec $1 tc filter show dev eth0 ingress | grep tc_packet_func) if [[ $hook != *"tc_packet_func"* ]]; then echo "ERROR : No hook point found"; diff --git a/cicd/sctpmh-seagull/validation.sh b/cicd/sctpmh-seagull/validation.sh index 25b73e7b1..d9f416bb7 100755 --- a/cicd/sctpmh-seagull/validation.sh +++ b/cicd/sctpmh-seagull/validation.sh @@ -46,11 +46,11 @@ echo -e "\n$border" echo -e "\n\n\n$border\n" if [[ $code == 0 ]]; then - echo -e "SCTP Multihoming CICD [OK]" + echo -e "SCTP multihoming with seagull CICD [OK]" else - echo -e "SCTP Multihoming CICD [NOK]" + echo -e "SCTP Multihoming with seagull CICD [NOK]" fi -echo -e "\n$border\n" +echo -e "\n$border\n"` exit $code diff --git a/cicd/sctpmh-seagull/validation1.sh b/cicd/sctpmh-seagull/validation1.sh index 20e0454f8..6bde78ab0 100755 --- a/cicd/sctpmh-seagull/validation1.sh +++ b/cicd/sctpmh-seagull/validation1.sh @@ -56,7 +56,7 @@ else echo "llb1 ep-info" $dexec llb1 loxicmd get ep echo "llb1 bpf-info" - $dexec llb1 ntc filter show dev eth0 ingress + $dexec llb1 tc filter show dev eth0 ingress echo "BFP trace -- " sudo timeout 5 cat /sys/kernel/debug/tracing/trace_pipe sudo killall -9 cat diff --git a/cicd/sctpmh/config.sh b/cicd/sctpmh/config.sh index 2436deedb..b14694a07 100755 --- a/cicd/sctpmh/config.sh +++ b/cicd/sctpmh/config.sh @@ -21,18 +21,18 @@ echo "#########################################" echo "Connecting and configuring hosts" echo "#########################################" -connect_docker_hosts user r1 1500 -connect_docker_hosts user r2 1500 -connect_docker_hosts r1 sw1 1500 -connect_docker_hosts r2 sw1 1500 -connect_docker_hosts sw1 llb1 1500 -connect_docker_hosts sw1 llb2 1500 -connect_docker_hosts llb1 sw2 1500 -connect_docker_hosts llb2 sw2 1500 -connect_docker_hosts sw2 r3 1500 -connect_docker_hosts sw2 r4 1500 -connect_docker_hosts r3 ep1 1500 -connect_docker_hosts r4 ep1 1500 +connect_docker_hosts user r1 +connect_docker_hosts user r2 +connect_docker_hosts r1 sw1 +connect_docker_hosts r2 sw1 +connect_docker_hosts sw1 llb1 +connect_docker_hosts sw1 llb2 +connect_docker_hosts llb1 sw2 +connect_docker_hosts llb2 sw2 +connect_docker_hosts sw2 r3 +connect_docker_hosts sw2 r4 +connect_docker_hosts r3 ep1 +connect_docker_hosts r4 ep1 create_docker_host_cnbridge --host1 sw1 --host2 llb1 create_docker_host_cnbridge --host1 sw1 --host2 llb2 diff --git a/cicd/sctpmh/validation2.sh b/cicd/sctpmh/validation2.sh index 3829422b0..122fb03a8 100755 --- a/cicd/sctpmh/validation2.sh +++ b/cicd/sctpmh/validation2.sh @@ -15,7 +15,7 @@ echo -e "\nHA state Master:$master BACKUP-$backup\n" $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 -m 100 -x 50000 > 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 10000 > user.out & #Path counters p1c_old=0 @@ -26,7 +26,7 @@ p3c_old=0 p3c_new=0 for((i=0;i<100;i++)) do - fin=`tail -n 100 user.out | grep "Client: Sending packets.(50000/50000)"` + fin=`tail -n 100 user.out | grep "Client: Sending packets.(10000/10000)"` if [[ ! -z $fin ]]; then fin=1 echo "sctp_test done." diff --git a/cicd/sctpmh/validation3.sh b/cicd/sctpmh/validation3.sh index f2d3a8939..b80ca3eed 100755 --- a/cicd/sctpmh/validation3.sh +++ b/cicd/sctpmh/validation3.sh @@ -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 -m 100 -x 50000 > 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 1000 > user.out & #Path counters p1c_old=0 p1c_new=0 @@ -28,8 +28,11 @@ p3c_old=0 p3c_new=0 down=0 code=0 + +sleep 5 + for((i=0;i<200;i++)) do - fin=`tail -n 100 user.out | grep "Client: Sending packets.(50000/50000)"` + fin=`tail -n 100 user.out | grep "Client: Sending packets.(1000/1000)"` if [[ ! -z $fin ]]; then fin=1 echo "sctp_test done." diff --git a/cicd/sctpmh/validation4.sh b/cicd/sctpmh/validation4.sh index 93f76e10a..4bb191834 100755 --- a/cicd/sctpmh/validation4.sh +++ b/cicd/sctpmh/validation4.sh @@ -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 -m 100 -x 50000 > 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 1000 > ep1.out & #Path counters p1c_old=0 @@ -27,8 +27,10 @@ p3c_old=0 p3c_new=0 down=0 code=0 +sleep 2 + for((i=0;i<200;i++)) do - fin=`tail -n 100 ep1.out | grep "Client: Sending packets.(50000/50000)"` + fin=`tail -n 100 ep1.out | grep "Client: Sending packets.(1000/1000)"` if [[ ! -z $fin ]]; then fin=1 echo "sctp_test done." diff --git a/cicd/sctpmh/validation5.sh b/cicd/sctpmh/validation5.sh index 61d4a40bd..757a65d4b 100755 --- a/cicd/sctpmh/validation5.sh +++ b/cicd/sctpmh/validation5.sh @@ -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 -m 1400 -x 300000 > 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 10000 > user.out & #Path counters p1c_old=0 @@ -33,8 +33,8 @@ hadone=0 code=0 nsyncOk=0 -for((i=0;i<200;i++)) do - fin=`tail -n 100 user.out | grep "Client: Sending packets.(300000/300000)"` +for((i=0;i<400;i++)) do + fin=`tail -n 100 user.out | grep "Client: Sending packets.(10000/10000)"` if [[ ! -z $fin ]]; then fin=1 echo "sctp_test done." diff --git a/cicd/sctpmh/validation6.sh b/cicd/sctpmh/validation6.sh index bbccecd3a..585ed17c3 100755 --- a/cicd/sctpmh/validation6.sh +++ b/cicd/sctpmh/validation6.sh @@ -21,7 +21,7 @@ sudo pkill sctp_test $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 -m 1400 -x 500000 > 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 10000 > ep1.out & #Path counters p1c_old=0 @@ -35,8 +35,8 @@ hadone=0 code=0 nsyncOk=0 -for((i=0;i<200;i++)) do - fin=`tail -n 100 ep1.out | grep "Client: Sending packets.(500000/500000)"` +for((i=0;i<500;i++)) do + fin=`tail -n 100 ep1.out | grep "Client: Sending packets.(10000/10000)"` if [[ ! -z $fin ]]; then fin=1 echo "sctp_test done."