From 0ecb8bab1f0c3de031f6d05dbb69be8429b81025 Mon Sep 17 00:00:00 2001 From: JacobGros Date: Fri, 23 Feb 2024 15:20:17 -0500 Subject: [PATCH] add debug logs --- pkg/utils/status.go | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/pkg/utils/status.go b/pkg/utils/status.go index 5c217215a..93a21a19a 100644 --- a/pkg/utils/status.go +++ b/pkg/utils/status.go @@ -667,11 +667,13 @@ func appMobStatusCheck(ctx context.Context, instance *csmv1.ContainerStorageModu } checkFn := func(deployment *appsv1.Deployment) bool { + log.Infof("Deployment: %s has %s ready replicas and %s replicas", deployment.Name, deployment.Status.ReadyReplicas, deployment.Spec.Replicas) return deployment.Status.ReadyReplicas == *deployment.Spec.Replicas } for _, deployment := range deploymentList.Items { deployment := deployment + log.Infof("Checking deployment: %s", deployment.Name) switch deployment.Name { case "cert-manager": if certEnabled { @@ -707,9 +709,10 @@ func appMobStatusCheck(ctx context.Context, instance *csmv1.ContainerStorageModu return false, err } - log.Info("podList: %+v\n", podList) + //log.Info("podList: %+v\n", podList) for _, pod := range podList.Items { + log.Infof("Checking Daemonset pod: %s", pod.Name) if pod.Status.Phase == corev1.PodRunning { readyPods++ } else { @@ -723,6 +726,17 @@ func appMobStatusCheck(ctx context.Context, instance *csmv1.ContainerStorageModu daemonRunning = true } + log.Infof("readyPods: %s", readyPods) + log.Infof("notreadyPods: %s", notreadyPods) + log.Infof("certEnabled: %s", certEnabled) + log.Infof("veleroEnabled: %s", veleroEnabled) + log.Infof("certManagerRunning: %s", certManagerRunning) + log.Infof("certManagerCainInjectorRunning: %s", certManagerCainInjectorRunning) + log.Infof("certManagerWebhookRunning: %s", certManagerWebhookRunning) + log.Infof("veleroRunning: %s", veleroRunning) + log.Infof("daemonRunning: %s", daemonRunning) + + if certEnabled && veleroEnabled { return appMobRunning && certManagerRunning && certManagerCainInjectorRunning && certManagerWebhookRunning && veleroRunning && daemonRunning, nil }