From 0f4c4a8e9033f60da0bbaf42062ae5c3641ab6ec Mon Sep 17 00:00:00 2001 From: Nikhil Malik Date: Wed, 28 Feb 2024 17:08:02 +0900 Subject: [PATCH 1/2] bfd status show correct source ip --- proto/bfd.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/proto/bfd.go b/proto/bfd.go index 043c07bb..878916f9 100644 --- a/proto/bfd.go +++ b/proto/bfd.go @@ -79,6 +79,7 @@ type Notifer interface { type bfdSession struct { RemoteName string + SourceIP string Instance string Cxn net.Conn State SessionState @@ -191,7 +192,7 @@ func (bs *Struct) BFDGet() ([]cmn.BFDMod, error) { pair := strings.Split(s.RemoteName, ":") temp.Instance = s.Instance temp.RemoteIP = net.ParseIP(pair[0]) - temp.SourceIP = tk.NltoIP(s.MyDisc) + temp.SourceIP = net.ParseIP(s.SourceIP) port, _ := strconv.Atoi(pair[1]) temp.Port = uint16(port) temp.Interval = uint64(s.DesMinTxInt) @@ -411,7 +412,8 @@ func (b *bfdSession) initialize(remoteIP string, sourceIP string, port uint16, i if myIP == nil { return errors.New("source address malformed") } - + b.SourceIP = sourceIP + if myIP.IsUnspecified() { myIP = getMyDisc(ip) if myIP == nil { From 2538c74549580f2956a2808602eed04146dd1e70 Mon Sep 17 00:00:00 2001 From: Nikhil Malik Date: Mon, 4 Mar 2024 17:25:59 +0900 Subject: [PATCH 2/2] Updated CICD to k8s v1.29.2 --- cicd/k8s-calico/config.sh | 25 +++++++++++++++++++++++++ cicd/k8s-calico/node_scripts/common.sh | 16 ++++++++-------- cicd/k8s-calico/node_scripts/master.sh | 0 cicd/k8s-calico/validation.sh | 2 +- cicd/k8s-calico/yaml/settings.yaml | 3 ++- 5 files changed, 36 insertions(+), 10 deletions(-) mode change 100644 => 100755 cicd/k8s-calico/node_scripts/master.sh diff --git a/cicd/k8s-calico/config.sh b/cicd/k8s-calico/config.sh index 65beb8f7..1a81f9f3 100755 --- a/cicd/k8s-calico/config.sh +++ b/cicd/k8s-calico/config.sh @@ -45,3 +45,28 @@ vagrant ssh master -c 'kubectl apply -f /vagrant/yaml/sctp_onearm.yml' 2> /dev/n vagrant ssh master -c 'kubectl apply -f /vagrant/yaml/tcp_fullnat.yml' 2> /dev/null vagrant ssh master -c 'kubectl apply -f /vagrant/yaml/udp_fullnat.yml' 2> /dev/null vagrant ssh master -c 'kubectl apply -f /vagrant/yaml/sctp_fullnat.yml' 2> /dev/null + +for((i=1; i<=60; i++)) +do + fin=1 + pods=$(vagrant ssh master -c 'kubectl get pods -A' 2> /dev/null | grep -v "NAMESPACE") + + while IFS= read -a pods; do + read -a pod <<< "$pods" + if [[ ${pod[3]} != *"Running"* ]]; then + echo "${pod[1]} is not UP yet" + fin=0 + fi + done <<< "$pods" + if [ $fin == 1 ]; + then + echo "Cluster is ready" + break; + fi + echo "Will try after 10s" + sleep 10 +done + +if [[ $fin == 0 ]]; then + exit 1 +fi diff --git a/cicd/k8s-calico/node_scripts/common.sh b/cicd/k8s-calico/node_scripts/common.sh index cf1e66f1..1e68fa83 100644 --- a/cicd/k8s-calico/node_scripts/common.sh +++ b/cicd/k8s-calico/node_scripts/common.sh @@ -26,7 +26,7 @@ sudo apt-get update -y # Install CRI-O Runtime VERSION="$(echo ${KUBERNETES_VERSION} | grep -oE '[0-9]+\.[0-9]+')" - +CRIO_VERSION=1.27 # Create the .conf file to load the modules at bootup cat <