From c1bffc27849ed795938ccdee2d2078a38af9f1f7 Mon Sep 17 00:00:00 2001 From: Ian Rodney Date: Mon, 5 Apr 2021 13:57:55 -0700 Subject: [PATCH] [Core] Pick Up GCS Port From Env Variable (#15097) --- python/ray/node.py | 4 ++++ python/ray/ray_constants.py | 2 ++ 2 files changed, 6 insertions(+) diff --git a/python/ray/node.py b/python/ray/node.py index 99d40906a..5e771176b 100644 --- a/python/ray/node.py +++ b/python/ray/node.py @@ -208,6 +208,10 @@ class Node: if head: ray_params.update_if_absent(num_redis_shards=1) + gcs_server_port = os.getenv( + ray_constants.GCS_PORT_ENVIRONMENT_VARIABLE) + if gcs_server_port: + ray_params.update_if_absent(gcs_server_port=gcs_server_port) self._webui_url = None else: self._webui_url = ( diff --git a/python/ray/ray_constants.py b/python/ray/ray_constants.py index 6194b896d..e49ba1c85 100644 --- a/python/ray/ray_constants.py +++ b/python/ray/ray_constants.py @@ -234,3 +234,5 @@ MAX_INT64_VALUE = 9223372036854775807 # Object Spilling related constants DEFAULT_OBJECT_PREFIX = "ray_spilled_objects" + +GCS_PORT_ENVIRONMENT_VARIABLE = "RAY_GCS_SERVER_PORT"