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

Make Dashboard Port Configurable #8999

Merged
merged 4 commits into from
Jun 19, 2020

Conversation

mfitton
Copy link
Contributor

@mfitton mfitton commented Jun 17, 2020

Why are these changes needed?

These changes are needed because currently the user cannot specify the port that they wish to start the dashboard on, and it is frequently requested as a feature. In addition, this makes the ray dashboard command work with a remote port that is not the default dashboard port, so that this can be supported in the autoscaler as well.
In addition, I renamed the variables that mention webui as we have started referring to the web ui as the dashboard widely.

Related issue number

Checks

  • 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/latest/.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failure rates at https://ray-travis-tracker.herokuapp.com/.
  • Testing Strategy
    • Unit tests
    • Release tests
    • This PR is not tested (please justify below)

Max Fitton added 2 commits June 17, 2020 14:28
…name an existing argument from include-webui to include-dashboard as part of more consistent naming, and update the dashboard command to be able to connect to an arbitrary remote port on a cluster
@AmplabJenkins
Copy link

Can one of the admins verify this patch?

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/27264/
Test FAILed.

Copy link
Contributor

@edoakes edoakes left a comment

Choose a reason for hiding this comment

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

LGTM. Please ping when tests pass and you've tested locally

@@ -31,7 +31,8 @@
"chmod +x hey_linux_amd64"
])

ray.init(address=cluster.address, include_webui=True, webui_host="0.0.0.0")
ray.init(
address=cluster.address, include_dashboard=True, dashboard_host="0.0.0.0")
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't need include_dashboard right?


ray.init(
address=cluster.address,
include_webui=True,
webui_host="0.0.0.0",
include_dashboard=True,
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't need include_dashboard right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, you're correct actually. I mindlessly put it there because we had passed include_webui before hehe.

" (DEPRECATED: please use --dashboard-host)")
@click.option(
"--include-dashboard",
default=None,
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we be starting it by default? A question for another PR

Copy link
Contributor

Choose a reason for hiding this comment

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

I am confused. It must be started by default right? Why is i the question for another PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We do start it by default already. In retrospect, my comment description here could've been more clear. I will rewrite. The default arg of None starts the dashboard.

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh, interesting. So you have to set --include-dashboard=False to not start it? I think I was confused by the flag name.

@@ -323,6 +350,20 @@ def start(node_ip_address, redis_address, address, redis_port, port,
if port is not None and port != redis_port:
raise ValueError("Cannot specify both --port and --redis-port "
"as port is a rename of deprecated redis-port")
if include_webui is not None:
Copy link
Contributor

Choose a reason for hiding this comment

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

If it's not None we should probably either error or set the value for include_dashboard to what include_webui is set to

Copy link
Contributor

Choose a reason for hiding this comment

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

Similar to what you have for the host flags below

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Makes sense.

@@ -443,8 +485,13 @@ def start(node_ip_address, redis_address, address, redis_port, port,
raise Exception("If --head is not passed in, --redis-max-clients "
"must not be provided.")
if include_webui:
raise Exception("If --head is not passed in, the --include-webui "
"flag is not relevant.")
raise Exception(
Copy link
Contributor

Choose a reason for hiding this comment

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

Try not to raise bare Exceptions, we should probably raise ValueError in this case

@@ -323,6 +350,20 @@ def start(node_ip_address, redis_address, address, redis_port, port,
if port is not None and port != redis_port:
raise ValueError("Cannot specify both --port and --redis-port "
"as port is a rename of deprecated redis-port")
if include_webui is not None:
logger.warn("The --include-webui argument will be deprecated soon. "
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you write something more specific? For example, --include-webui argument will be deprecated at the version 0.8.7

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This makes sense. I'm concerned I'll forget to remove it for the 0.8.7 release though. Do we have a way we normally keep track of deprecations?

Copy link
Contributor

Choose a reason for hiding this comment

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

No need to specify a release, what you have is fine


dashboard_host_default = "localhost"
if webui_host != dashboard_host_default:
logger.warn("The --webui-host argument will be deprecated soon. "
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here

" (DEPRECATED: please use --dashboard-host)")
@click.option(
"--include-dashboard",
default=None,
Copy link
Contributor

Choose a reason for hiding this comment

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

I am confused. It must be started by default right? Why is i the question for another PR?

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/27265/
Test FAILed.

@@ -1125,7 +1128,6 @@ def start_dashboard(require_webui,
Returns:
ProcessInfo for the process that was started.
"""
port = 8265 # Note: list(map(ord, "RAY")) == [82, 65, 89]
while True:
Copy link

Choose a reason for hiding this comment

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

I guess you would like to maintain old behavior i.e. port += 1 only when port == ray_constants.DEFAULT_DASHBOARD_PORT, or the documentation above needs update to:

(Note that the port number increases if the default port is not available)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point, thank you.

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/27294/
Test FAILed.

…ior if the default port is passed in for the dashboard.
@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Ray-PRB/27304/
Test FAILed.

@edoakes edoakes merged commit ad09aa9 into ray-project:master Jun 19, 2020
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.

5 participants