diff --git a/python/ray/serve/api.py b/python/ray/serve/api.py index ef45331fe..52ede1749 100644 --- a/python/ray/serve/api.py +++ b/python/ray/serve/api.py @@ -62,7 +62,6 @@ def accept_batch(f): def init(cluster_name=None, blocking=False, - start_server=True, http_host=DEFAULT_HTTP_HOST, http_port=DEFAULT_HTTP_PORT, ray_init_kwargs={ @@ -84,8 +83,6 @@ def init(cluster_name=None, specified in all subsequent serve.init() calls. blocking (bool): If true, the function will wait for the HTTP server to be healthy, and other components to be ready before returns. - start_server (bool): If true, `serve.init` starts http server. - (Default: True) http_host (str): Host for HTTP server. Default to "0.0.0.0". http_port (int): Port for HTTP server. Default to 8000. ray_init_kwargs (dict): Argument passed to ray.init, if there is no ray @@ -126,10 +123,9 @@ def init(cluster_name=None, master_actor = ServeMaster.options( name=master_actor_name, max_restarts=-1, - ).remote(cluster_name, start_server, http_node_id, http_host, http_port, - metric_exporter) + ).remote(cluster_name, http_node_id, http_host, http_port, metric_exporter) - if start_server and blocking: + if blocking: block_until_http_ready("http://{}:{}/-/routes".format( http_host, http_port)) diff --git a/python/ray/serve/master.py b/python/ray/serve/master.py index 887e778b0..07605da1e 100644 --- a/python/ray/serve/master.py +++ b/python/ray/serve/master.py @@ -50,9 +50,8 @@ class ServeMaster: requires all implementations here to be idempotent. """ - async def __init__(self, cluster_name, start_http_proxy, http_node_id, - http_proxy_host, http_proxy_port, - metric_exporter_class): + async def __init__(self, cluster_name, http_node_id, http_proxy_host, + http_proxy_port, metric_exporter_class): # Unique name of the serve cluster managed by this actor. Used to # namespace child actors and checkpoints. self.cluster_name = cluster_name @@ -93,9 +92,8 @@ class ServeMaster: # components. If recovering, fetches their actor handles. self._get_or_start_metric_exporter(metric_exporter_class) self._get_or_start_router() - if start_http_proxy: - self._get_or_start_http_proxy(http_node_id, http_proxy_host, - http_proxy_port) + self._get_or_start_http_proxy(http_node_id, http_proxy_host, + http_proxy_port) # NOTE(edoakes): unfortunately, we can't completely recover from a # checkpoint in the constructor because we block while waiting for