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

[Serve] Let the controller look up the head node and fix flaky standalone3 healthz test #36878

Merged
merged 24 commits into from
Jun 30, 2023

Conversation

GeneDer
Copy link
Contributor

@GeneDer GeneDer commented Jun 27, 2023

Why are these changes needed?

  • Make sure we are using wait_for_condition in the test (could take
    time to broadcast).
  • Remove head_node_id from controller init args and instead fetch it
    in the controller init. Also remove it from serve_start in
    _private/api.py.
  • Add an assertion to check that the controller actually runs on the
    head node (use ray.nodes() and look for head node resource).
  • Filter Nones from the active node set in deployment_state. Add a
    unit test for this, it should never return None.

Related issue number

Closes: #37001

Fixes flaky test: https://buildkite.com/ray-project/oss-ci-build-branch/builds/4687#0188fdc4-2bd2-4e43-828c-d92f6d48e89d

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

Signed-off-by: Gene Su <e870252314@gmail.com>
@GeneDer GeneDer requested a review from edoakes June 27, 2023 20:43
GeneDer added 3 commits June 27, 2023 15:27
Signed-off-by: Gene Su <e870252314@gmail.com>
Signed-off-by: Gene Su <e870252314@gmail.com>
…e look up in http state

Signed-off-by: Gene Su <e870252314@gmail.com>
python/ray/serve/_private/utils.py Show resolved Hide resolved
python/ray/serve/_private/http_state.py Outdated Show resolved Hide resolved
python/ray/serve/controller.py Outdated Show resolved Hide resolved
python/ray/serve/tests/test_http_state.py Outdated Show resolved Hide resolved
python/ray/serve/tests/test_standalone3.py Outdated Show resolved Hide resolved
python/ray/serve/tests/test_util.py Show resolved Hide resolved
GeneDer added 2 commits June 28, 2023 13:56
Signed-off-by: Gene Su <e870252314@gmail.com>
Signed-off-by: Gene Su <e870252314@gmail.com>
Copy link
Contributor

@sihanwang41 sihanwang41 left a comment

Choose a reason for hiding this comment

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

Suggestion: Change the pr title. This pr is mainly for sticking the controller to the head node.

Thank you Gene!

python/ray/serve/_private/utils.py Show resolved Hide resolved
@GeneDer GeneDer changed the title [Serve] fix flaky standalone3 healthz test [Serve] Sticking the controller to the head node and fix flaky standalone3 healthz test Jun 28, 2023
@sihanwang41
Copy link
Contributor

Sorry, i misread the code. the controller is already stick with head node. We just potentially pass wrong head_node_id to the controller. (this pr can fix it)

Suggestion: Change the pr title. This pr is mainly for sticking the controller to the head node.

Thank you Gene!

Signed-off-by: Gene Su <e870252314@gmail.com>
@GeneDer GeneDer changed the title [Serve] Sticking the controller to the head node and fix flaky standalone3 healthz test [Serve] Let the controller look up the head node and fix flaky standalone3 healthz test Jun 28, 2023
@edoakes
Copy link
Contributor

edoakes commented Jun 29, 2023

@GeneDer test_serve_ha failed, likely related

GeneDer added 15 commits June 28, 2023 22:13
Signed-off-by: Gene Su <e870252314@gmail.com>
Signed-off-by: Gene Su <e870252314@gmail.com>
Signed-off-by: Gene Su <e870252314@gmail.com>
Signed-off-by: Gene Su <e870252314@gmail.com>
Signed-off-by: Gene Su <e870252314@gmail.com>
Signed-off-by: Gene Su <e870252314@gmail.com>
Signed-off-by: Gene Su <e870252314@gmail.com>
Signed-off-by: Gene Su <e870252314@gmail.com>
Signed-off-by: Gene Su <e870252314@gmail.com>
Signed-off-by: Gene Su <e870252314@gmail.com>
Signed-off-by: Gene Su <e870252314@gmail.com>
…orker.client()

Signed-off-by: Gene Su <e870252314@gmail.com>
Signed-off-by: Gene Su <e870252314@gmail.com>
Signed-off-by: Gene Su <e870252314@gmail.com>
GeneDer added 2 commits June 30, 2023 09:54
Signed-off-by: Gene Su <e870252314@gmail.com>
Signed-off-by: Gene Su <e870252314@gmail.com>
@edoakes edoakes merged commit ed8a79a into ray-project:master Jun 30, 2023
arvind-chandra pushed a commit to lmco/ray that referenced this pull request Aug 31, 2023
…lone3 healthz test (ray-project#36878)

- Make sure we are using wait_for_condition in the test (could take
time to broadcast).
- Remove head_node_id from controller init args and instead fetch it
in the controller init. Also remove it from serve_start in
_private/api.py.
- Add an assertion to check that the controller actually runs on the
head node (use ray.nodes() and look for head node resource).
- Filter Nones from the active node set in deployment_state. Add a
unit test for this, it should never return None.

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.

[Serve] Standalone3 test flaky
3 participants