Skip to content

[RayCluster] Add serviceName to status.headInfo #2089

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

Merged
merged 1 commit into from
Apr 23, 2024

Conversation

andrewsykim
Copy link
Member

Why are these changes needed?

Add service name to HeadInfo

Related issue number

Checks

  • I've made sure the tests are passing.
  • Testing Strategy
    • Unit tests
    • Manual tests
    • This PR is not tested :(

@andrewsykim andrewsykim force-pushed the head-service-name branch 3 times, most recently from c03543e to 9062dc8 Compare April 19, 2024 16:37
@andrewsykim
Copy link
Member Author

cc @kevin85421

@kevin85421 kevin85421 self-requested a review April 20, 2024 07:03
@kevin85421 kevin85421 self-assigned this Apr 20, 2024
} else if len(runtimeServices.Items) > 1 {
return "", fmt.Errorf("found multiple head services. cluster name %s, filter labels %v", instance.Name, filterLabels)
return "", "", fmt.Errorf("found multiple head services. cluster name %s, filter labels %v", instance.Name, filterLabels)
} else if runtimeServices.Items[0].Spec.ClusterIP == "" {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure if a headless service’s ClusterIP is "" or "None".

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's "None"

(I'm not changing this in this PR anyways)

var headSvcName string

headSvcName = rayCluster.Status.Head.ServiceName
if headSvcName == "" {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which case will go into this if statement? If it is a canary, we may consider removing it at this moment until we find that there is a case that needs to be handled by this if statement. It may hide the actual root causes deeper.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking about the version skew problem if user updates operator before CRD when uprading from v1.1 to v1.2

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can probably remove it though, just being extra safe here

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking about the version skew problem if user updates operator before CRD when uprading from v1.1 to v1.2

It makes sense to me. We can keep it and add a warning log when it falls back to this if statement.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can keep it and add a warning log when it falls back to this if statement.

This would require wiring in the context so we can get the logger with ctrl.LoggerFrom(ctx). Do we still want the warning?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am fine with passing context into this function.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sounds good, let me incoporate this

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated to pass context to InitClient and log a message when .status.head.serviceName is empty

@kevin85421
Copy link
Member

@andrewsykim do you want to include this PR into v1.1.1?

@andrewsykim
Copy link
Member Author

do you want to include this PR into v1.1.1?

Probably not because it's not fixing any bugs.

Signed-off-by: Andrew Sy Kim <andrewsy@google.com>
@kevin85421 kevin85421 merged commit ffac341 into ray-project:master Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants