Skip to content

Commit

Permalink
[Fix][RayCluster] fix missing pod name in CreatedWorkerPod and Failed…
Browse files Browse the repository at this point in the history
…ToCreateWorkerPod events (#3057) (#3065)

Signed-off-by: Rueian <rueiancsie@gmail.com>
Co-authored-by: Rueian <rueiancsie@gmail.com>
  • Loading branch information
andrewsykim and rueian authored Feb 15, 2025
1 parent 6b1091c commit 7f8f278
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ray-operator/controllers/ray/raycluster_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -1081,12 +1081,12 @@ func (r *RayClusterReconciler) createWorkerPod(ctx context.Context, instance ray

replica := pod
if err := r.Create(ctx, &replica); err != nil {
r.Recorder.Eventf(&instance, corev1.EventTypeWarning, string(utils.FailedToCreateWorkerPod), "Failed to create worker Pod %s/%s, %v", pod.Namespace, pod.Name, err)
r.Recorder.Eventf(&instance, corev1.EventTypeWarning, string(utils.FailedToCreateWorkerPod), "Failed to create worker Pod for the cluster %s/%s, %v", instance.Namespace, instance.Name, err)
return err
}
r.rayClusterScaleExpectation.ExpectScalePod(replica.Namespace, instance.Name, worker.GroupName, replica.Name, expectations.Create)
logger.Info("Created worker Pod for RayCluster", "name", pod.Name)
r.Recorder.Eventf(&instance, corev1.EventTypeNormal, string(utils.CreatedWorkerPod), "Created worker Pod %s/%s", pod.Namespace, pod.Name)
logger.Info("Created worker Pod for RayCluster", "name", replica.Name)
r.Recorder.Eventf(&instance, corev1.EventTypeNormal, string(utils.CreatedWorkerPod), "Created worker Pod %s/%s", replica.Namespace, replica.Name)
return nil
}

Expand Down

0 comments on commit 7f8f278

Please sign in to comment.