From 914eb58c59c7a0fd52b41ed2bfdd81bb24b74d73 Mon Sep 17 00:00:00 2001 From: Maciej Zimnoch Date: Mon, 26 Jun 2023 10:27:55 +0200 Subject: [PATCH] Fix panic in Operator occuring during node replacement Log messages and progressing condition were using nil Pod object which caused panic due to nil pointer dereference. Fixes #1287 --- pkg/controller/scyllacluster/sync_services.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/controller/scyllacluster/sync_services.go b/pkg/controller/scyllacluster/sync_services.go index 546e441306a..575418451ba 100644 --- a/pkg/controller/scyllacluster/sync_services.go +++ b/pkg/controller/scyllacluster/sync_services.go @@ -360,13 +360,13 @@ func (scc *Controller) syncServices( klog.V(2).InfoS("Pod has not been recreated by the StatefulSet controller yet", "ScyllaCluster", klog.KObj(sc), - "Pod", klog.KObj(pod), + "Pod", klog.KObj(svc), ) progressingConditions = append(progressingConditions, metav1.Condition{ Type: serviceControllerProgressingCondition, Status: metav1.ConditionTrue, Reason: "WaitingForPodRecreation", - Message: fmt.Sprintf("Service %q is waiting for StatefulSet controller to recreate pod %q.", naming.ObjRef(svc), naming.ObjRef(pod)), + Message: fmt.Sprintf("Service %q is waiting for StatefulSet controller to recreate pod.", naming.ObjRef(svc)), ObservedGeneration: sc.Generation, }) } else {