Skip to content

[Core] Write ray address even if ray node is started with --block - #32961

Merged
jjyao merged 3 commits into
ray-project:masterfrom
jjyao:jjyao/block
Mar 2, 2023
Merged

[Core] Write ray address even if ray node is started with --block#32961
jjyao merged 3 commits into
ray-project:masterfrom
jjyao:jjyao/block

Conversation

@jjyao

@jjyao jjyao commented Mar 2, 2023

Copy link
Copy Markdown
Contributor

Why are these changes needed?

With #26678, when a ray cluster is started, its address is written to /tmp/ray/ray_current_cluster so ray.init() can find the existing cluster and connect to it by default. However if a node is started with ray start --block, the file is not created so ray.init() will create a new cluster instead of connecting to the existing one, which is unexpected.

Related issue number

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 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 :(

Signed-off-by: Jiajun Yao <jeromeyjj@gmail.com>
@jjyao

jjyao commented Mar 2, 2023

Copy link
Copy Markdown
Contributor Author

I'll add tests but want to open the PR first to see if we want to include it in 2.3.1 (my vote is yes). I have seen two users encountered this issue. cc @ericl

@ericl

ericl commented Mar 2, 2023

Copy link
Copy Markdown
Contributor

This seems harmless enough to include!

Signed-off-by: Jiajun Yao <jeromeyjj@gmail.com>
@jjyao
jjyao requested a review from ericl March 2, 2023 05:37
@jjyao

jjyao commented Mar 2, 2023

Copy link
Copy Markdown
Contributor Author

@ericl it's ready for review.

Signed-off-by: Jiajun Yao <jeromeyjj@gmail.com>
@jjyao
jjyao merged commit 4d0ce8d into ray-project:master Mar 2, 2023
@jjyao
jjyao deleted the jjyao/block branch March 2, 2023 20:24
jjyao added a commit that referenced this pull request Mar 2, 2023
…2961)

With #26678, when a ray cluster is started, it's address is written to /tmp/ray/ray_current_cluster so ray.init() can find the existing cluster and connect to it by default. However if a node is started with ray start --block, the file is not created so ray.init() will create a new cluster instead of connecting to the existing one, which is unexpected.

Signed-off-by: Jiajun Yao <jeromeyjj@gmail.com>
@zhe-thoughts

Copy link
Copy Markdown
Contributor

+1 to cherry-pick to 2.3.1 since it's a low risk change

ProjectsByJackHe pushed a commit to ProjectsByJackHe/ray that referenced this pull request Mar 21, 2023
…y-project#32961)

With ray-project#26678, when a ray cluster is started, it's address is written to /tmp/ray/ray_current_cluster so ray.init() can find the existing cluster and connect to it by default. However if a node is started with ray start --block, the file is not created so ray.init() will create a new cluster instead of connecting to the existing one, which is unexpected.

Signed-off-by: Jiajun Yao <jeromeyjj@gmail.com>
Signed-off-by: Jack He <jackhe2345@gmail.com>
edoakes pushed a commit to edoakes/ray that referenced this pull request Mar 22, 2023
…y-project#32961)

With ray-project#26678, when a ray cluster is started, it's address is written to /tmp/ray/ray_current_cluster so ray.init() can find the existing cluster and connect to it by default. However if a node is started with ray start --block, the file is not created so ray.init() will create a new cluster instead of connecting to the existing one, which is unexpected.

Signed-off-by: Jiajun Yao <jeromeyjj@gmail.com>
Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com>
peytondmurray pushed a commit to peytondmurray/ray that referenced this pull request Mar 22, 2023
…y-project#32961)

With ray-project#26678, when a ray cluster is started, it's address is written to /tmp/ray/ray_current_cluster so ray.init() can find the existing cluster and connect to it by default. However if a node is started with ray start --block, the file is not created so ray.init() will create a new cluster instead of connecting to the existing one, which is unexpected.

Signed-off-by: Jiajun Yao <jeromeyjj@gmail.com>
elliottower pushed a commit to elliottower/ray that referenced this pull request Apr 22, 2023
…y-project#32961)

With ray-project#26678, when a ray cluster is started, it's address is written to /tmp/ray/ray_current_cluster so ray.init() can find the existing cluster and connect to it by default. However if a node is started with ray start --block, the file is not created so ray.init() will create a new cluster instead of connecting to the existing one, which is unexpected.

Signed-off-by: Jiajun Yao <jeromeyjj@gmail.com>
Signed-off-by: elliottower <elliot@elliottower.com>
ProjectsByJackHe pushed a commit to ProjectsByJackHe/ray that referenced this pull request May 4, 2023
…y-project#32961)

With ray-project#26678, when a ray cluster is started, it's address is written to /tmp/ray/ray_current_cluster so ray.init() can find the existing cluster and connect to it by default. However if a node is started with ray start --block, the file is not created so ray.init() will create a new cluster instead of connecting to the existing one, which is unexpected.

Signed-off-by: Jiajun Yao <jeromeyjj@gmail.com>
Signed-off-by: Jack He <jackhe2345@gmail.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.

4 participants