Add fqdn - #5108
Open
AlterHoodie wants to merge 2 commits into
Open
Conversation
Always create the headless Service and set worker Pod hostname/subdomain from replica indices so workers keep a stable DNS name across recreates. Hostname assignment stays behind RayMultiHostIndexing.
AlterHoodie
requested review from
MortalHappiness,
andrewsykim,
kevin85421 and
rueian
as code owners
August 8, 2026 07:44
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
Reviewed by Cursor Bugbot for commit 0b6dd32. Configure here.
| hostname = fmt.Sprintf("%s-%d", groupName, replicaIndex) | ||
| } | ||
| return utils.CheckLabel(hostname) | ||
| } |
There was a problem hiding this comment.
Invalid DNS worker hostnames
High Severity
generateWorkerHostname builds pod.spec.hostname from raw groupName and only runs CheckLabel, which does not enforce DNS-1123 rules. Worker groupName values may include uppercase or _ today, and with RayMultiHostIndexing defaulting on those pods are rejected on create. Existing clusters that previously worked can stop reconciling workers.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 0b6dd32. Configure here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Why are these changes needed?
Ray worker Pods are only addressable by Pod IP today, and that IP changes whenever a Pod is recreated. This PR sets worker
hostname/subdomainfrom replica (and host - for multihost) indices and always creates the RayCluster headless Service so each worker gets a stable Pod FQDN that can survive recreates.Hostname/subdomain assignment still sits behind
RayMultiHostIndexing, since that is where replica indices are assigned. Creating the headless Service is no longer limited to multi-host groups (NumOfHosts > 1).That stretches the meaning of
RayMultiHostIndexing. Looking for guidance on whether to:RayMultiHostIndexing, orRayMultiHostIndexing(default on).Note: The multi_host e2e test has been extended to support FQDN verification , depending on above decision will split into its own e2e test.
Related issue number
Closes #5000
Checks
Manual test instructions
./hack/local_deploy.shor equivalent) and ensureRayMultiHostIndexing=true.kubectl get svc | grep headless kubectl get pods -l ray.io/node-type=worker -o custom-columns=\ NAME:.metadata.name,HOSTNAME:.spec.hostname,SUBDOMAIN:.spec.subdomain,IP:.status.podIP