Skip to content

Commit

Permalink
Revert "Revert "[dashboard] Fix RAY_RAYLET_PID KeyError on Windows (r…
Browse files Browse the repository at this point in the history
  • Loading branch information
amogkam authored Jan 25, 2021
1 parent 1c77cc7 commit d96a9fa
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions dashboard/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,13 @@ def __init__(self,
self.object_store_name = object_store_name
self.raylet_name = raylet_name
self.node_id = os.environ["RAY_NODE_ID"]
self.ppid = int(os.environ["RAY_RAYLET_PID"])
assert self.ppid > 0
logger.info("Parent pid is %s", self.ppid)
# TODO(edoakes): RAY_RAYLET_PID isn't properly set on Windows. This is
# only used for fate-sharing with the raylet and we need a different
# fate-sharing mechanism for Windows anyways.
if sys.platform not in ["win32", "cygwin"]:
self.ppid = int(os.environ["RAY_RAYLET_PID"])
assert self.ppid > 0
logger.info("Parent pid is %s", self.ppid)
self.server = aiogrpc.server(options=(("grpc.so_reuseport", 0), ))
self.grpc_port = self.server.add_insecure_port(
f"[::]:{self.dashboard_agent_port}")
Expand Down Expand Up @@ -108,7 +112,8 @@ async def _check_parent():
logger.error("Failed to check parent PID, exiting.")
sys.exit(1)

check_parent_task = create_task(_check_parent())
if sys.platform not in ["win32", "cygwin"]:
check_parent_task = create_task(_check_parent())

# Create an aioredis client for all modules.
try:
Expand Down

0 comments on commit d96a9fa

Please sign in to comment.