From 00c16746e514ab85a557ca8210e689f892ebf095 Mon Sep 17 00:00:00 2001 From: Eugene Rakhmatulin Date: Thu, 26 Mar 2026 16:45:35 -0700 Subject: [PATCH] Handle new copy hosts setup in run-recipe.py --- run-recipe.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/run-recipe.py b/run-recipe.py index 842f99b..2c700ea 100755 --- a/run-recipe.py +++ b/run-recipe.py @@ -954,6 +954,7 @@ Examples: discovered_env = run_autodiscover() if discovered_env and discovered_env.get("CLUSTER_NODES"): + env = discovered_env # use freshly loaded env from autodiscover nodes = parse_nodes(discovered_env["CLUSTER_NODES"]) nodes_from_env = True @@ -1000,8 +1001,17 @@ Examples: print(f" 2. Remove nodes from .env: {sys.argv[0]} --show-env") return 1 - # Determine copy targets for cluster deployments - copy_targets = worker_nodes if is_cluster else None + # Determine copy targets for build/model distribution. + # Prefer COPY_HOSTS from .env (may differ from CLUSTER_NODES in mesh mode), + # fall back to worker_nodes derived from CLUSTER_NODES. + if is_cluster: + copy_hosts_str = env.get("COPY_HOSTS") + if copy_hosts_str: + copy_targets = [h.strip() for h in copy_hosts_str.split(",") if h.strip()] + else: + copy_targets = worker_nodes + else: + copy_targets = None if args.dry_run: print("=== Dry Run ===")