From 5d4d47b66945e01ff6254bdce15c0fa0f72befbf Mon Sep 17 00:00:00 2001 From: Christian Cadieux Date: Fri, 17 Mar 2023 12:46:04 -0600 Subject: [PATCH 1/2] add lock on AllPodsByNode --- pkg/watcher/watcher.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/watcher/watcher.go b/pkg/watcher/watcher.go index 7160f5d..f31c64d 100644 --- a/pkg/watcher/watcher.go +++ b/pkg/watcher/watcher.go @@ -745,12 +745,14 @@ func (w *Watcher) buildNodeConfig() ([]*v1.Node, error) { func (w *Watcher) GetPodIPsOnNode(nodeName string, serviceName string, namespace string, portName string) []string { // fetch all the pod IPs on the node + w.RLock() nodePodIPs := []string{} for _, p := range w.AllPodsByNode[nodeName] { if len(p.Status.PodIP) > 0 { nodePodIPs = append(nodePodIPs, p.Status.PodIP) } } + w.RUnlock() // log.Println("watcher: GetPodIPsOnNode: found", len(nodePodIPs), "pod IPs for node", nodeName) var foundIPs []string From 4063cf85bd0550baa4994f13b7e539ffabcc9707 Mon Sep 17 00:00:00 2001 From: Christian Cadieux Date: Fri, 17 Mar 2023 12:53:44 -0600 Subject: [PATCH 2/2] info --- Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 27d6900..dd59df5 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,7 @@ -TAG=v2.6.0-proto205 +TAG=v2.6.2 # hub.comcast.net/k8s-eng/ravel:v2.6.0-proto205 -> v2.6.0-rc7 +# c2.6.2: adding lock on watcher.AllPodsByNode # v2.6.0-proto189 -> v2.6.0-rc4 # rc6: hub.comcast.net/k8s-eng/ravel:v2.5.0-proto45 # rc7: hub.comcast.net/k8s-eng/ravel:v2.5.0-proto66 @@ -17,8 +18,8 @@ build: docker build -t hub.comcast.net/k8s-eng/ravel:${TAG} -f Dockerfile . push: - DOCKER_HOST=ssh://69.252.103.115 docker push hub.comcast.net/k8s-eng/ravel:${TAG} - #docker push hub.comcast.net/k8s-eng/ravel:${TAG} + #DOCKER_HOST=ssh://69.252.103.115 docker push hub.comcast.net/k8s-eng/ravel:${TAG} + docker push hub.comcast.net/k8s-eng/ravel:${TAG} default-gobgp: build-gobgp push-gobgp