diff --git a/cicd/sctpmh-seagull/check_ha.sh b/cicd/sctpmh-seagull/check_ha.sh index b31574fb0..1abf45a66 100644 --- a/cicd/sctpmh-seagull/check_ha.sh +++ b/cicd/sctpmh-seagull/check_ha.sh @@ -80,12 +80,15 @@ function restart_mloxilb() { ka=" --ka=172.17.0.2:172.17.0.3" fi echo "Restarting MASTER: $master" - pid=$(docker exec -i $master ps -aef | grep $pat | xargs | cut -d ' ' -f 2) + #pid=$(docker exec -i $master ps -aef | grep $pat | xargs | cut -d ' ' -f 2) + pid=$(ps -aef | grep $pat | xargs | cut -d ' ' -f 2) echo "Killing $pid" >&2 - docker exec -dt $master kill -9 $pid + #docker exec -dt $master kill -9 $pid + sudo kill -9 $pid docker exec -dt $master ip link del llb0 - docker exec -dt $master nohup /root/loxilb-io/loxilb/loxilb $copts $self $ka > /dev/null & - pid=$(docker exec -i $master ps -aef | grep $pat | xargs | cut -d ' ' -f 2) + docker exec -dt $master /root/loxilb-io/loxilb/loxilb $copts $self $ka + #pid=$(docker exec -i $master ps -aef | grep $pat | xargs | cut -d ' ' -f 2) + pid=$(ps -aef | grep $pat | xargs | cut -d ' ' -f 2) echo "New loxilb pid: $pid" >&2 } @@ -112,23 +115,30 @@ function restart_loxilbs() { bka=" --ka=172.17.0.3:172.17.0.2" fi echo "Restarting $master" - pid=$(docker exec -i $master ps -aef | grep $mpat | xargs | cut -d ' ' -f 2) - echo "Killing $mpid" >&2 - docker exec -dt $master kill -9 $pid + pid=$(ps -aef | grep $mpat | xargs | cut -d ' ' -f 2) + #pid=$(docker exec -i $master ps -aef | grep $mpat | xargs | cut -d ' ' -f 2) + echo "Killing $pid" >&2 + #docker exec -dt $master kill -9 $pid + sudo kill -9 $pid docker exec -dt $master ip link del llb0 - docker exec -dt $master nohup /root/loxilb-io/loxilb/loxilb $mcopts $mself $mka > /dev/null & - pid=$(docker exec -i $master ps -aef | grep $mpat | xargs | cut -d ' ' -f 2) + echo "/root/loxilb-io/loxilb/loxilb $mcopts $mself $mka" >&2 + docker exec -dt $master /root/loxilb-io/loxilb/loxilb $mcopts $mself $mka + pid=$(ps -aef | grep $mpat | xargs | cut -d ' ' -f 2) + #pid=$(docker exec -i $master ps -aef | grep $mpat | xargs | cut -d ' ' -f 2) echo "New loxilb pid: $pid" >&2 echo "Restarting $backup" - pid=$(docker exec -i $backup ps -aef | grep $bpat | xargs | cut -d ' ' -f 2) + pid=$(ps -aef | grep $bpat | xargs | cut -d ' ' -f 2) + #pid=$(docker exec -i $backup ps -aef | grep $bpat | xargs | cut -d ' ' -f 2) echo "Killing $pid" >&2 - docker exec -dt $backup kill -9 $pid + #docker exec -dt $backup kill -9 $pid + sudo kill -9 $pid docker exec -dt $backup ip link del llb0 - docker exec -dt $backup nohup /root/loxilb-io/loxilb/loxilb $bcopts $bself $bka > /dev/null & - pid=$(docker exec -i $backup ps -aef | grep $bpat | xargs | cut -d ' ' -f 2) + echo "/root/loxilb-io/loxilb/loxilb $bcopts $bself $bka" >&2 + docker exec -dt $backup /root/loxilb-io/loxilb/loxilb $bcopts $bself $bka + #pid=$(docker exec -i $backup ps -aef | grep $bpat | xargs | cut -d ' ' -f 2) + pid=$(ps -aef | grep $bpat | xargs | cut -d ' ' -f 2) echo "New loxilb pid: $pid" >&2 - } diff --git a/cicd/sctpmh-seagull/setup.sh b/cicd/sctpmh-seagull/setup.sh index a19ff84d0..4d7cd2d4d 100755 --- a/cicd/sctpmh-seagull/setup.sh +++ b/cicd/sctpmh-seagull/setup.sh @@ -5,7 +5,7 @@ source /vagrant/common.sh echo "#########################################" echo "Spawning all hosts" echo "#########################################" - +sudo sysctl net.ipv4.conf.all.arp_accept=1 spawn_docker_host --dock-type loxilb --dock-name llb1 --with-ka in spawn_docker_host --dock-type loxilb --dock-name llb2 --with-ka in spawn_docker_host --dock-type seahost --dock-name ep1 diff --git a/cicd/sctpmh-seagull/validation2.sh b/cicd/sctpmh-seagull/validation2.sh index f001a497f..0faa0b504 100755 --- a/cicd/sctpmh-seagull/validation2.sh +++ b/cicd/sctpmh-seagull/validation2.sh @@ -35,9 +35,9 @@ for((i=0;i<5;i++)) do echo -e "\n\n" $dexec $master loxicmd get ct --servName=sctpmh1 echo -e "\n" - p1c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh1 | grep "20.20.20.1 | 1.1.1.1" | xargs | cut -d '|' -f 10) - p2c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh1 | grep "21.21.21.1 | 2.2.2.1" | xargs | cut -d '|' -f 10) - p3c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh1 | grep "22.22.22.1 | 1.1.1.1" | xargs | cut -d '|' -f 10) + p1c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh1 | grep "20.20.20.1 | 1.1.1.1" | xargs | cut -d '|' -f 11) + p2c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh1 | grep "21.21.21.1 | 2.2.2.1" | xargs | cut -d '|' -f 11) + p3c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh1 | grep "22.22.22.1 | 1.1.1.1" | xargs | cut -d '|' -f 11) echo "Counters: $p1c_new $p2c_new $p3c_new" diff --git a/cicd/sctpmh-seagull/validation3.sh b/cicd/sctpmh-seagull/validation3.sh index 5a31136d9..9a9284906 100755 --- a/cicd/sctpmh-seagull/validation3.sh +++ b/cicd/sctpmh-seagull/validation3.sh @@ -46,9 +46,9 @@ for((i=0;i<35;i++)) do echo -e "\n\n" $dexec $master loxicmd get ct --servName=sctpmh1 echo -e "\n" - p1c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh1 | grep "20.20.20.1 | 1.1.1.1" | xargs | cut -d '|' -f 10) - p2c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh1 | grep "21.21.21.1 | 2.2.2.1" | xargs | cut -d '|' -f 10) - p3c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh1 | grep "22.22.22.1 | 1.1.1.1" | xargs | cut -d '|' -f 10) + p1c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh1 | grep "20.20.20.1 | 1.1.1.1" | xargs | cut -d '|' -f 11) + p2c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh1 | grep "21.21.21.1 | 2.2.2.1" | xargs | cut -d '|' -f 11) + p3c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh1 | grep "22.22.22.1 | 1.1.1.1" | xargs | cut -d '|' -f 11) echo "Counters: $p1c_new $p2c_new $p3c_new" @@ -62,7 +62,7 @@ for((i=0;i<35;i++)) do echo -e "Turning off this path from User->LB\n" $hexec user ip link set euserr1 down; down=1 - p1c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh1 | grep "20.20.20.1 | 1.1.1.1" | xargs | cut -d '|' -f 10) + p1c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh1 | grep "20.20.20.1 | 1.1.1.1" | xargs | cut -d '|' -f 11) else if [[ $down == 1 ]]; then p1dok=1 diff --git a/cicd/sctpmh-seagull/validation4.sh b/cicd/sctpmh-seagull/validation4.sh index 0bf76671f..3034827c5 100755 --- a/cicd/sctpmh-seagull/validation4.sh +++ b/cicd/sctpmh-seagull/validation4.sh @@ -47,9 +47,9 @@ for((i=0;i<35;i++)) do echo -e "\n" $dexec $master loxicmd get ct --servName=sctpmh2 echo -e "\n" - p1c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh2 | grep "133.133.133.1 | 31.31.31.1" | xargs | cut -d '|' -f 10) - p2c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh2 | grep "134.134.134.1 | 32.32.32.1" | xargs | cut -d '|' -f 10) - p3c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh2 | grep "135.135.135.1 | 31.31.31.1" | xargs | cut -d '|' -f 10) + p1c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh2 | grep "133.133.133.1 | 31.31.31.1" | xargs | cut -d '|' -f 11) + p2c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh2 | grep "134.134.134.1 | 32.32.32.1" | xargs | cut -d '|' -f 11) + p3c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh2 | grep "135.135.135.1 | 31.31.31.1" | xargs | cut -d '|' -f 11) echo "Counters: $p1c_new $p2c_new $p3c_new" diff --git a/cicd/sctpmh-seagull/validation5.sh b/cicd/sctpmh-seagull/validation5.sh index 8bb74733d..10a9a2a89 100755 --- a/cicd/sctpmh-seagull/validation5.sh +++ b/cicd/sctpmh-seagull/validation5.sh @@ -51,9 +51,9 @@ for((i=0;i<15;i++)) do $dexec $master loxicmd get ct --servName=sctpmh1 echo -e "\n" - p1c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh1 | grep "20.20.20.1 | 1.1.1.1" | xargs | cut -d '|' -f 10) - p2c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh1 | grep "21.21.21.1 | 2.2.2.1" | xargs | cut -d '|' -f 10) - p3c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh1 | grep "22.22.22.1 | 1.1.1.1" | xargs | cut -d '|' -f 10) + p1c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh1 | grep "20.20.20.1 | 1.1.1.1" | xargs | cut -d '|' -f 11) + p2c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh1 | grep "21.21.21.1 | 2.2.2.1" | xargs | cut -d '|' -f 11) + p3c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh1 | grep "22.22.22.1 | 1.1.1.1" | xargs | cut -d '|' -f 11) echo "Counters: $p1c_new $p2c_new $p3c_new" if [[ $p1c_new -gt $p1c_old ]]; then diff --git a/cicd/sctpmh-seagull/validation6.sh b/cicd/sctpmh-seagull/validation6.sh index 768d6a485..86dc2c39f 100755 --- a/cicd/sctpmh-seagull/validation6.sh +++ b/cicd/sctpmh-seagull/validation6.sh @@ -55,9 +55,9 @@ for((i=0;i<15;i++)) do echo -e "\n" $dexec $master loxicmd get ct --servName=sctpmh2 echo -e "\n" - p1c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh2 | grep "133.133.133.1 | 31.31.31.1" | xargs | cut -d '|' -f 10) - p2c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh2 | grep "134.134.134.1 | 32.32.32.1" | xargs | cut -d '|' -f 10) - p3c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh2 | grep "135.135.135.1 | 31.31.31.1" | xargs | cut -d '|' -f 10) + p1c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh2 | grep "133.133.133.1 | 31.31.31.1" | xargs | cut -d '|' -f 11) + p2c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh2 | grep "134.134.134.1 | 32.32.32.1" | xargs | cut -d '|' -f 11) + p3c_new=$(sudo docker exec -i $master loxicmd get ct --servName=sctpmh2 | grep "135.135.135.1 | 31.31.31.1" | xargs | cut -d '|' -f 11) echo "Counters: $p1c_new $p2c_new $p3c_new"