[Dashboard] Change default ip address for the dashboard to ipv4 (#10287)

* Done.

* Add todo.

* Addressed code review.

* Fix issue.

* Fix test failure.

* Fix a test.
This commit is contained in:
SangBin Cho
2020-08-27 14:43:10 -07:00
committed by GitHub
parent 7dbc1f439c
commit f35339b5ff
6 changed files with 12 additions and 8 deletions
+1 -1
View File
@@ -129,7 +129,7 @@ class RayParams:
worker_path=None,
huge_pages=False,
include_dashboard=None,
dashboard_host="localhost",
dashboard_host=ray_constants.DEFAULT_DASHBOARD_IP,
dashboard_port=ray_constants.DEFAULT_DASHBOARD_PORT,
logging_level=logging.INFO,
logging_format=ray_constants.LOGGER_FORMAT,
+1
View File
@@ -36,6 +36,7 @@ REDIS_MINIMUM_MEMORY_BYTES = 10**7
# we attempt to start the service running at this port.
DEFAULT_PORT = 6379
DEFAULT_DASHBOARD_IP = "127.0.0.1"
DEFAULT_DASHBOARD_PORT = 8265
PROMETHEUS_SERVICE_DISCOVERY_FILE = "prom_metrics_service_discovery.json"
# Default resource requirements for actors when no resource requirements are
+5 -5
View File
@@ -132,7 +132,7 @@ def test_worker_stats(shutdown_only):
assert (wait_until_server_available(addresses["webui_url"]) is True)
webui_url = addresses["webui_url"]
webui_url = webui_url.replace("localhost", "http://127.0.0.1")
webui_url = webui_url.replace("127.0.0.1", "http://127.0.0.1")
for worker in reply.workers_stats:
if worker.is_driver:
continue
@@ -198,7 +198,7 @@ def test_raylet_info_endpoint(shutdown_only):
time.sleep(1)
try:
webui_url = addresses["webui_url"]
webui_url = webui_url.replace("localhost", "http://127.0.0.1")
webui_url = webui_url.replace("127.0.0.1", "http://127.0.0.1")
response = requests.get(webui_url + "/api/raylet_info")
response.raise_for_status()
try:
@@ -276,7 +276,7 @@ def test_raylet_infeasible_tasks(shutdown_only):
def test_infeasible_actor(ray_addresses):
assert (wait_until_server_available(addresses["webui_url"]) is True)
webui_url = ray_addresses["webui_url"].replace("localhost",
webui_url = ray_addresses["webui_url"].replace("127.0.0.1",
"http://127.0.0.1")
raylet_info = requests.get(webui_url + "/api/raylet_info").json()
actor_info = raylet_info["result"]["actors"]
@@ -316,7 +316,7 @@ def test_raylet_pending_tasks(shutdown_only):
def test_pending_actor(ray_addresses):
assert (wait_until_server_available(addresses["webui_url"]) is True)
webui_url = ray_addresses["webui_url"].replace("localhost",
webui_url = ray_addresses["webui_url"].replace("127.0.0.1",
"http://127.0.0.1")
raylet_info = requests.get(webui_url + "/api/raylet_info").json()
actor_info = raylet_info["result"]["actors"]
@@ -409,7 +409,7 @@ def test_memory_dashboard(shutdown_only):
https://docs.ray.io/en/latest/memory-management.html#debugging-using-ray-memory
"""
addresses = ray.init(num_cpus=2)
webui_url = addresses["webui_url"].replace("localhost", "http://127.0.0.1")
webui_url = addresses["webui_url"].replace("127.0.0.1", "http://127.0.0.1")
assert (wait_until_server_available(addresses["webui_url"]) is True)
def get_memory_table():
+1 -1
View File
@@ -48,7 +48,7 @@ def test_output():
r"for objects. You can adjust these settings with .*?.", lines[0])
assert re.match(
logging_header +
r"services.py:\d+ -- View the Ray dashboard at .*?localhost:\d+?.*",
r"services.py:\d+ -- View the Ray dashboard at .*?127.0.0.1:\d+?.*",
lines[1])
+1 -1
View File
@@ -501,7 +501,7 @@ def init(address=None,
huge_pages=False,
include_java=False,
include_dashboard=None,
dashboard_host="localhost",
dashboard_host=ray_constants.DEFAULT_DASHBOARD_IP,
dashboard_port=ray_constants.DEFAULT_DASHBOARD_PORT,
job_id=None,
job_config=None,
+3
View File
@@ -132,6 +132,9 @@ extras["all"] = list(set(chain.from_iterable(extras.values())))
# should be carefully curated. If you change it, please reflect
# the change in the matching section of requirements.txt
install_requires = [
# TODO(alex) Pin the version once this PR is
# included in the stable release.
# https://github.com/aio-libs/aiohttp/pull/4556#issuecomment-679228562
"aiohttp",
"aiohttp_cors",
"aioredis",