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

[Feature] REP 54: Add PodName to the HeadInfo #2236

Closed
2 tasks done
rueian opened this issue Jul 11, 2024 · 1 comment · Fixed by #2266
Closed
2 tasks done

[Feature] REP 54: Add PodName to the HeadInfo #2236

rueian opened this issue Jul 11, 2024 · 1 comment · Fixed by #2266
Assignees
Labels

Comments

@rueian
Copy link
Contributor

rueian commented Jul 11, 2024

Search before asking

  • I had searched in the issues and found no similar feature requirement.

Description

This is one of the tracking items of the REP: RayCluster status improvement, the step 4 in the design doc: https://docs.google.com/document/d/1bRL0cZa87eCX6SI7gqthN68CgmHaB6l3-vJuIse-BrY

We should record the name of the Ray Head Pod in the RayCluster.Status.Head.PodName field and make the getHeadPod function retrieve the pod based on the field.

// 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) {
podList := corev1.PodList{}
if err := r.List(ctx, &podList, common.RayClusterHeadPodsAssociationOptions(instance).ToListOptions()...); err != nil {
return nil, err
}
if len(podList.Items) != 1 {
return nil, fmt.Errorf("Found %d head pods for RayCluster %s in the namespace %s", len(podList.Items), instance.Name, instance.Namespace)
}
return &podList.Items[0], nil
}

Use case

No response

Related issues

ray-project/enhancements#54

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!
@rueian rueian added enhancement New feature or request triage labels Jul 11, 2024
@rueian
Copy link
Contributor Author

rueian commented Jul 11, 2024

I will take this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants