[Core] Allow to pass node ip address to gcs server. (#10946)

* Allow to pass node ip address to gcs server.

* Fix.

* Addressed code review.

* Fixed an error.

* Addressed code review.
This commit is contained in:
SangBin Cho
2020-09-23 01:52:26 -07:00
committed by GitHub
parent ba5a3ae9e2
commit 390107b6cb
5 changed files with 17 additions and 7 deletions
+2 -1
View File
@@ -680,7 +680,8 @@ class Node:
config=self._config,
fate_share=self.kernel_fate_share,
gcs_server_port=self._ray_params.gcs_server_port,
metrics_agent_port=self._ray_params.metrics_agent_port)
metrics_agent_port=self._ray_params.metrics_agent_port,
node_ip_address=self._node_ip_address)
assert (
ray_constants.PROCESS_TYPE_GCS_SERVER not in self.all_processes)
self.all_processes[ray_constants.PROCESS_TYPE_GCS_SERVER] = [
+4 -1
View File
@@ -1097,7 +1097,8 @@ def start_gcs_server(redis_address,
config=None,
fate_share=None,
gcs_server_port=None,
metrics_agent_port=None):
metrics_agent_port=None,
node_ip_address=None):
"""Start a gcs server.
Args:
redis_address (str): The address that the Redis server is listening on.
@@ -1110,6 +1111,7 @@ def start_gcs_server(redis_address,
override defaults in RayConfig.
gcs_server_port (int): Port number of the gcs server.
metrics_agent_port(int): The port where metrics agent is bound to.
node_ip_address(str): IP Address of a node where gcs server starts.
Returns:
ProcessInfo for the process that was started.
"""
@@ -1126,6 +1128,7 @@ def start_gcs_server(redis_address,
f"--config_list={config_str}",
f"--gcs_server_port={gcs_server_port}",
f"--metrics-agent-port={metrics_agent_port}",
f"--node-ip-address={node_ip_address}",
]
if redis_password:
command += [f"--redis_password={redis_password}"]