From 0592dcacba42b27bbc55b2a3a347667127e79a14 Mon Sep 17 00:00:00 2001 From: Ian Rodney Date: Thu, 10 Sep 2020 19:44:58 -0700 Subject: [PATCH] [autoscaler] Fix rsync file mounts (#10721) --- python/ray/autoscaler/commands.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/python/ray/autoscaler/commands.py b/python/ray/autoscaler/commands.py index 18327847b..94af7ad5e 100644 --- a/python/ray/autoscaler/commands.py +++ b/python/ray/autoscaler/commands.py @@ -959,10 +959,11 @@ def rsync(config_file: str, config = _bootstrap_config(config, no_config_cache=no_config_cache) is_file_mount = False - for remote_mount in config.get("file_mounts", {}).keys(): - if remote_mount in (source if down else target): - is_file_mount = True - break + if source and target: + for remote_mount in config.get("file_mounts", {}).keys(): + if (source if down else target).startswith(remote_mount): + is_file_mount = True + break provider = get_node_provider(config["provider"], config["cluster_name"]) try: