From 108c39dd6ea9a5d57b06ca34254c6b15039031f5 Mon Sep 17 00:00:00 2001 From: Kjeld Schouten Date: Sat, 26 Oct 2024 14:25:16 +0200 Subject: [PATCH] fix(clustertool): improve pod-status checking message and behavior --- clustertool/pkg/kubectlcmds/checkstatus.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/clustertool/pkg/kubectlcmds/checkstatus.go b/clustertool/pkg/kubectlcmds/checkstatus.go index 7a62d3897d5..eeb174aea65 100644 --- a/clustertool/pkg/kubectlcmds/checkstatus.go +++ b/clustertool/pkg/kubectlcmds/checkstatus.go @@ -44,7 +44,10 @@ func CheckStatus(requiredPods []string, excludePod []string, timeout time.Durati // Get pods in all namespaces pods, err := clientset.CoreV1().Pods("").List(context.TODO(), metav1.ListOptions{}) if err != nil { - log.Error().Err(err).Msg("Error listing pods") + log.Debug().Err(err).Msg("Error listing pods") + log.Warn().Msg("Cannot recieve pods (yet), waiting before checking again") + time.Sleep(5 * time.Second) + continue } // Check if the required pods are both present and running