From 49a4f821bced98eb3746ff57a5d56ca78c1ca487 Mon Sep 17 00:00:00 2001 From: Michael Burman Date: Fri, 7 Feb 2025 18:13:04 +0200 Subject: [PATCH] Do not check the HostID of the pod if it is not ready --- pkg/reconciliation/reconcile_racks.go | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/pkg/reconciliation/reconcile_racks.go b/pkg/reconciliation/reconcile_racks.go index abbddd80..1208cc45 100644 --- a/pkg/reconciliation/reconcile_racks.go +++ b/pkg/reconciliation/reconcile_racks.go @@ -2271,12 +2271,14 @@ func (rc *ReconciliationContext) CheckCassandraNodeStatuses() result.ReconcileRe dc := rc.Datacenter logger := rc.ReqLogger - // Check that we have a HostID for every pod in the datacenter + // Check that we have a HostID for every pod in the datacenter that has started for _, pod := range rc.dcPods { - nodeStatus, ok := dc.Status.NodeStatuses[pod.Name] - if !ok || nodeStatus.HostID == "" { - logger.Info("Missing host id", "pod", pod.Name) - return result.RequeueSoon(2) + if isServerStarted(pod) { + nodeStatus, ok := dc.Status.NodeStatuses[pod.Name] + if !ok || nodeStatus.HostID == "" { + logger.Info("Missing host id", "pod", pod.Name) + return result.RequeueSoon(2) + } } }