Skip to content

Commit

Permalink
else block added
Browse files Browse the repository at this point in the history
  • Loading branch information
oksanabaza committed Sep 5, 2024
1 parent 3fbce0f commit bd35cf5
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions ray-operator/controllers/ray/raycluster_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit bd35cf5

Please sign in to comment.