Skip to content

Commit

Permalink
Merge pull request #600 from nik-netlox/main
Browse files Browse the repository at this point in the history
sctp mh case added
  • Loading branch information
UltraInstinct14 committed Mar 25, 2024
2 parents b87a5f1 + 64e1c58 commit 5561427
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cicd/k3s-flannel-multus/bastion.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
apt-get update
apt-get install -y software-properties-common curl wget
apt-get install -y software-properties-common curl wget lksctp-tools
23 changes: 23 additions & 0 deletions cicd/k3s-flannel-multus/host_validation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
extIP=$(cat /vagrant/extIP)

tcp_port=55002
sctp_port=55002

code=0
echo Service IP: $extIP
Expand All @@ -17,4 +18,26 @@ else
code=1
fi
done

for((i=0;i<20;i++))
do
stdbuf -oL sctp_darn -H 0.0.0.0 -h $extIP -p $sctp_port -s < /vagrant/input > output
#sleep 1
exp="New connection, peer addresses
4.0.5.2:55002
4.0.3.1:55002
4.0.4.1:55002"

res=`cat output | grep -A 3 "New connection, peer addresses"`
sudo rm -rf output
if [[ "$res" == "$exp" ]]; then
#echo $res
echo "K3s-multus SCTP Multihoming service [OK]"
else
echo "K3s-multus SCTP Multihoming service [NOK]"
echo "Expected : $exp"
echo "Received : $res"
exit 1
fi
done
exit $code
1 change: 1 addition & 0 deletions cicd/k3s-flannel-multus/kube-loxilb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ spec:
args:
- --loxiURL=http://4.0.6.149:11111
- --externalCIDR=4.0.5.2/32
- --externalSecondaryCIDRs=4.0.4.1/24,4.0.3.1/24
#- --monitor
#- --setBGP
#- --setLBMode=1
Expand Down
2 changes: 2 additions & 0 deletions cicd/k3s-flannel-multus/master.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,6 @@ sudo ifconfig eth2 promisc

sudo kubectl apply -f /vagrant/multus/multus-pod.yml
sudo kubectl apply -f /vagrant/multus/multus-service.yml
sudo kubectl apply -f /vagrant/multus/multus-sctp-pod.yml
sudo kubectl apply -f /vagrant/multus/multus-sctp-service.yml
/vagrant/wait_ready.sh
2 changes: 1 addition & 1 deletion cicd/k3s-flannel-multus/multus/macvlan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ spec:
"rangeEnd": "4.0.6.100",
"routes": [
{
"dst": "4.0.5.0/24"
"dst": "0.0.0.0/0"
}
],
"gateway": "4.0.6.149"
Expand Down

0 comments on commit 5561427

Please sign in to comment.