[Dashboard] Update dashboard port checking to prevent unexpected port change#11487
Merged
rkooo567 merged 2 commits intoray-project:masterfrom Oct 21, 2020
Merged
Conversation
mfitton
approved these changes
Oct 20, 2020
Contributor
mfitton
left a comment
There was a problem hiding this comment.
Looks good! I'm glad you found the cause of this, it'd happened to me on occasion.
Contributor
Author
|
Can we merge this? The tests failures don't seem relevant. |
Contributor
|
@allenyin55 I actually am not able to merge pull requests. @rkooo567 could you please merge? |
Contributor
|
i guess this is not working. CI tests are all failing, and metrics agent test on Windows also fail. |
Contributor
|
Please merge the latest master, so that I can see if the test failure is unrelated. |
Contributor
Author
Just did. Does it look OK now @rkooo567 ? |
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?
Dashboard port sometimes is incremented unexpectedly (when the default port is available) when restarting ray clusters with short delays.
The root cause seems to be the socket gets into the
TIME_WAITstate and can't be immediately reused (see the last example here for more details). Setting theSO_REUSEADDRoption prevents this from happening.Related issue number
Checks
scripts/format.shto lint the changes in this PR.