Skip to content

Commit 7f8f278

Browse files
andrewsykimrueian
andauthored
[Fix][RayCluster] fix missing pod name in CreatedWorkerPod and FailedToCreateWorkerPod events (#3057) (#3065)
Signed-off-by: Rueian <[email protected]> Co-authored-by: Rueian <[email protected]>
1 parent 6b1091c commit 7f8f278

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ray-operator/controllers/ray/raycluster_controller.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1081,12 +1081,12 @@ func (r *RayClusterReconciler) createWorkerPod(ctx context.Context, instance ray
10811081

10821082
replica := pod
10831083
if err := r.Create(ctx, &replica); err != nil {
1084-
r.Recorder.Eventf(&instance, corev1.EventTypeWarning, string(utils.FailedToCreateWorkerPod), "Failed to create worker Pod %s/%s, %v", pod.Namespace, pod.Name, err)
1084+
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)
10851085
return err
10861086
}
10871087
r.rayClusterScaleExpectation.ExpectScalePod(replica.Namespace, instance.Name, worker.GroupName, replica.Name, expectations.Create)
1088-
logger.Info("Created worker Pod for RayCluster", "name", pod.Name)
1089-
r.Recorder.Eventf(&instance, corev1.EventTypeNormal, string(utils.CreatedWorkerPod), "Created worker Pod %s/%s", pod.Namespace, pod.Name)
1088+
logger.Info("Created worker Pod for RayCluster", "name", replica.Name)
1089+
r.Recorder.Eventf(&instance, corev1.EventTypeNormal, string(utils.CreatedWorkerPod), "Created worker Pod %s/%s", replica.Namespace, replica.Name)
10901090
return nil
10911091
}
10921092

0 commit comments

Comments
 (0)