Skip to content

Commit

Permalink
[Feat][RayService] Use the HeadInfo.PodName to get the Head Pod
Browse files Browse the repository at this point in the history
Signed-off-by: Rueian <[email protected]>
  • Loading branch information
rueian committed Jul 24, 2024
1 parent aaa346a commit 2da0db3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ray-operator/controllers/ray/rayservice_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -1225,7 +1225,7 @@ func isServeAppUnhealthyOrDeployedFailed(appStatus string) bool {
// TODO: Move this function to util.go and always use this function to retrieve the head Pod.
func (r *RayServiceReconciler) getHeadPod(ctx context.Context, instance *rayv1.RayCluster) (*corev1.Pod, error) {
if instance.Status.Head.PodName == "" {
return nil, fmt.Errorf("Found 0 head pods for RayCluster %s in the namespace %s", instance.Name, instance.Namespace)
return nil, fmt.Errorf("RayCluster %s in the namespace %s did not contain .Status.Head.PodName", instance.Name, instance.Namespace)
}
pod := &corev1.Pod{}
if err := r.Get(ctx, types.NamespacedName{Namespace: instance.Namespace, Name: instance.Status.Head.PodName}, pod); err != nil {
Expand Down

0 comments on commit 2da0db3

Please sign in to comment.