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

[core] Add ClusterID token to GCS server [3/n] #36535

Merged
merged 5 commits into from
Jun 30, 2023
Merged

Conversation

vitsai
Copy link
Contributor

@vitsai vitsai commented Jun 17, 2023

Add support for a GetClusterId RPC call in the GCS server that clients can use to obtain the cluster ID. In particular, GCS server will retrieve the cluster id from the persistent store if it exists, or otherwise generate a new one and store it.

Previous PR (GRPC client): #36526
Next PR (GCS client): #35014

Part 3 of breaking down #35014 into more digestible parts.

Why are these changes needed?

Related issue number

#34763

Checks

  • I've signed off every commit(by using the -s flag, i.e., git commit -s) in this PR.
  • I've run scripts/format.sh to lint the changes in this PR.
  • I've included any doc changes needed for https://docs.ray.io/en/master/.
    • I've added any new APIs to the API Reference. For example, if I added a
      method in Tune, I've added it in doc/source/tune/api/ under the
      corresponding .rst file.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/
  • Testing Strategy
    • Unit tests
    • Release tests
    • This PR is not tested :(

Copy link
Contributor

@fishbone fishbone left a comment

Choose a reason for hiding this comment

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

Please fix the comments.

Copy link
Collaborator

@jjyao jjyao left a comment

Choose a reason for hiding this comment

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

LGTM!

continuation = std::move(continuation)](std::optional<std::string> token) mutable {
if (!token.has_value()) {
ClusterID cluster_id = ClusterID::FromRandom();
RAY_LOG(INFO) << "No existing server token found. Generating new token: "
Copy link
Collaborator

Choose a reason for hiding this comment

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

token -> cluster id

});
} else {
ClusterID cluster_id = ClusterID::FromBinary(token.value());
RAY_LOG(INFO) << "Found existing server token: " << cluster_id;
Copy link
Collaborator

Choose a reason for hiding this comment

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

token -> cluster id

kTokenNamespace,
kClusterIdKey,
[this,
continuation = std::move(continuation)](std::optional<std::string> token) mutable {
Copy link
Collaborator

Choose a reason for hiding this comment

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

token -> cluster_id_binary?

Signed-off-by: vitsai <victoria@anyscale.com>
continuation(cluster_id);
});
} else {
ClusterID cluster_id = ClusterID::FromBinary(cluster_id.value());
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
ClusterID cluster_id = ClusterID::FromBinary(cluster_id.value());
ClusterID cluster_id = ClusterID::FromBinary(provided_cluster_id.value());

Signed-off-by: vitsai <victoria@anyscale.com>
@fishbone fishbone merged commit 00d633a into master Jun 30, 2023
@fishbone fishbone deleted the gcs-version-server branch June 30, 2023 18:02
fishbone pushed a commit that referenced this pull request Jul 10, 2023
Retrieve the token from the GCS server in the GCS client while connecting, to attach to metadata in requests.

Previous PR (GCS server): #36535
Next PR (auth): #36073
Bhav00 pushed a commit to Bhav00/ray that referenced this pull request Jul 11, 2023
Retrieve the token from the GCS server in the GCS client while connecting, to attach to metadata in requests.

Previous PR (GCS server): ray-project#36535
Next PR (auth): ray-project#36073

Signed-off-by: Bhavpreet Singh <singh.bhavpreet00@gmail.com>
vitsai added a commit that referenced this pull request Jul 11, 2023
Retrieve the token from the GCS server in the GCS client while connecting, to attach to metadata in requests.

Previous PR (GCS server): #36535
Next PR (auth): #36073
vitsai added a commit that referenced this pull request Jul 11, 2023
Retrieve the token from the GCS server in the GCS client while connecting, to attach to metadata in requests.

Previous PR (GCS server): #36535
Next PR (auth): #36073
Bhav00 pushed a commit to Bhav00/ray that referenced this pull request Jul 28, 2023
Retrieve the token from the GCS server in the GCS client while connecting, to attach to metadata in requests.

Previous PR (GCS server): ray-project#36535
Next PR (auth): ray-project#36073

Signed-off-by: Bhavpreet Singh <singh.bhavpreet00@gmail.com>
Bhav00 pushed a commit to Bhav00/ray that referenced this pull request Jul 28, 2023
Retrieve the token from the GCS server in the GCS client while connecting, to attach to metadata in requests.

Previous PR (GCS server): ray-project#36535
Next PR (auth): ray-project#36073

Signed-off-by: Bhavpreet Singh <singh.bhavpreet00@gmail.com>
NripeshN pushed a commit to NripeshN/ray that referenced this pull request Aug 15, 2023
Retrieve the token from the GCS server in the GCS client while connecting, to attach to metadata in requests.

Previous PR (GCS server): ray-project#36535
Next PR (auth): ray-project#36073

Signed-off-by: NripeshN <nn2012@hw.ac.uk>
arvind-chandra pushed a commit to lmco/ray that referenced this pull request Aug 31, 2023
This change adds a Cluster ID to GRPC client (client call, client call manager), and attaches it to the metadata of each ClientCall provided it is non-nil.

Previous PR (GRPC server): ray-project#36517
Next PR (GCS server): ray-project#36535

Part 2 of breaking down ray-project#35014 into more digestible parts.

Related issue number
ray-project#34763

Signed-off-by: e428265 <arvind.chandramouli@lmco.com>
arvind-chandra pushed a commit to lmco/ray that referenced this pull request Aug 31, 2023
Add support for a GetClusterId RPC call in the GCS server that clients can use to obtain the cluster ID. In particular, GCS server will retrieve the cluster id from the persistent store if it exists, or otherwise generate a new one and store it.

Previous PR (GRPC client): ray-project#36526
Next PR (GCS client): ray-project#35014

Part 3 of breaking down ray-project#35014 into more digestible parts.

Signed-off-by: e428265 <arvind.chandramouli@lmco.com>
arvind-chandra pushed a commit to lmco/ray that referenced this pull request Aug 31, 2023
Retrieve the token from the GCS server in the GCS client while connecting, to attach to metadata in requests.

Previous PR (GCS server): ray-project#36535
Next PR (auth): ray-project#36073

Signed-off-by: e428265 <arvind.chandramouli@lmco.com>
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.

3 participants