[dashboard] Fixes dashboard issues when environments have set http_proxy (#12598)

* fixes ray start with http_proxy

* format

* fixes

* fixes

* increase timeout

* address comments
This commit is contained in:
Xianyang Liu
2021-01-21 20:10:01 -08:00
committed by GitHub
parent 1fbb752f42
commit 4ecd29ea2b
8 changed files with 97 additions and 32 deletions
@@ -46,7 +46,9 @@ class LogicalViewHead(dashboard_utils.DashboardHeadModule):
except KeyError:
return rest_response(success=False, message="Bad Request")
try:
channel = aiogrpc.insecure_channel(f"{ip_address}:{port}")
options = (("grpc.enable_http_proxy", 0), )
channel = aiogrpc.insecure_channel(
f"{ip_address}:{port}", options=options)
stub = core_worker_pb2_grpc.CoreWorkerServiceStub(channel)
await stub.KillActor(
+3 -1
View File
@@ -38,7 +38,9 @@ class ReportHead(dashboard_utils.DashboardHeadModule):
if change.new:
node_id, ports = change.new
ip = DataSource.node_id_to_ip[node_id]
channel = aiogrpc.insecure_channel(f"{ip}:{ports[1]}")
options = (("grpc.enable_http_proxy", 0), )
channel = aiogrpc.insecure_channel(
f"{ip}:{ports[1]}", options=options)
stub = reporter_pb2_grpc.ReporterServiceStub(channel)
self._stubs[ip] = stub
@@ -71,7 +71,8 @@ class StatsCollector(dashboard_utils.DashboardHeadModule):
node_id, node_info = change.new
address = "{}:{}".format(node_info["nodeManagerAddress"],
int(node_info["nodeManagerPort"]))
channel = aiogrpc.insecure_channel(address)
options = (("grpc.enable_http_proxy", 0), )
channel = aiogrpc.insecure_channel(address, options=options)
stub = node_manager_pb2_grpc.NodeManagerServiceStub(channel)
self._stubs[node_id] = stub