Skip to content

Enable persistent Ray cluster state via external Redis GCS fault tolerance #821

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

kramaranya
Copy link

@kramaranya kramaranya commented Apr 14, 2025

Issue link

RHOAIENG-11115

What changes have been made

Provided Ray cluster head pod persistency through GCS fault tolerance.
Added new config options: enable_gcs_ft, redis_address, redis_password_secret and external_storage_namespace
Added unit tests to cover gcs fault tolerance

Verification steps

  • Provision a cluster
  • Deploy Redis in your cluster ( you can use this example)
  • Deploy KubeRay operator (1.3.0 or newer, RHOAI currently provides an older version)
  • Create RayCluster with GCS fault tolerance enabled, for example:
cluster = Cluster(ClusterConfiguration(
        name='raycluster',
        head_cpu_requests='500m',
        head_cpu_limits='500m',
        head_memory_requests=2,
        head_memory_limits=2,
        num_workers=1,
        worker_cpu_requests='250m',
        worker_cpu_limits=1,
        worker_memory_requests=4,
        worker_memory_limits=4,
        enable_gcs_ft=True,
        redis_address="redis:6379",
        redis_password_secret={
            "name": "redis-password-secret",
            "key": "password"
        }
    ))
  • Make sure all pods are running
  • Create a detached actor
  • Check if the actor is visible - ray list actors from RayCluster head pod
  • Restart the head pod
  • Run ray list actors - you should see previously created actor

Checks

  • I've made sure the tests are passing.
  • Testing Strategy
    • Unit tests
    • Manual tests
    • Testing is not required for this change

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 14, 2025
@kramaranya kramaranya changed the title [WIP] Enable persistent Ray cluster state via external Redis GCS fault tolerance Enable persistent Ray cluster state via external Redis GCS fault tolerance Apr 17, 2025
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 17, 2025
@openshift-ci openshift-ci bot added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Apr 23, 2025
@kryanbeane
Copy link

great work! lgtm

@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Apr 24, 2025
Copy link

codecov bot commented Apr 24, 2025

Codecov Report

Attention: Patch coverage is 95.65217% with 1 line in your changes missing coverage. Please review.

Project coverage is 92.45%. Comparing base (c311665) to head (b552de7).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/codeflare_sdk/ray/cluster/build_ray_cluster.py 88.88% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #821      +/-   ##
==========================================
+ Coverage   92.40%   92.45%   +0.04%     
==========================================
  Files          23       23              
  Lines        1396     1418      +22     
==========================================
+ Hits         1290     1311      +21     
- Misses        106      107       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link

@kryanbeane kryanbeane left a comment

Choose a reason for hiding this comment

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

thanks for adding the tests!

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Apr 24, 2025
Copy link
Contributor

openshift-ci bot commented Apr 24, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kryanbeane

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants