From 1979fd55379824d13156ac97e732f55241279b8e Mon Sep 17 00:00:00 2001 From: oksanabaza Date: Tue, 20 Aug 2024 10:43:34 +0100 Subject: [PATCH] Improve the logs before creating the ray cluster --- .../controllers/ray/raycluster_controller.go | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/ray-operator/controllers/ray/raycluster_controller.go b/ray-operator/controllers/ray/raycluster_controller.go index af7cb03e09..35a31f3b1b 100644 --- a/ray-operator/controllers/ray/raycluster_controller.go +++ b/ray-operator/controllers/ray/raycluster_controller.go @@ -692,6 +692,24 @@ func (r *RayClusterReconciler) reconcilePods(ctx context.Context, instance *rayv deleted := struct{}{} numDeletedUnhealthyWorkerPods := 0 for _, workerPod := range workerPods.Items { + if workerPod.Status.Phase != "Running" { + if len(workerPod.Status.Conditions) > 0 { + for _, condition := range workerPod.Status.Conditions { + if condition.Message != "" { + logger.Info("reconcilePods", + "Worker Pod Name", workerPod.Name, + "Status", workerPod.Status.Phase, + "Condition Type", condition.Type, + "Condition Status", condition.Status, + "Message", condition.Message) + } + } + } + } else { + logger.Info("reconcilePods", + "Worker Pod Name", workerPod.Name, + "Status", workerPod.Status.Phase) + } shouldDelete, reason := shouldDeletePod(workerPod, rayv1.WorkerNode) logger.Info("reconcilePods", "worker Pod", workerPod.Name, "shouldDelete", shouldDelete, "reason", reason) if shouldDelete {