Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve the logs before creating the ray cluster #2316

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
oksanabaza marked this conversation as resolved.
Show resolved Hide resolved
if shouldDelete {
Expand Down