|
@@ -71,6 +71,13 @@ pub async fn serve(
|
|
|
let mut recipe = load_recipe(recipe_name, &config.recipe_sources).await?;
|
|
let mut recipe = load_recipe(recipe_name, &config.recipe_sources).await?;
|
|
|
let rn = recipe.name.clone();
|
|
let rn = recipe.name.clone();
|
|
|
let re = recipe.engine.clone();
|
|
let re = recipe.engine.clone();
|
|
|
|
|
+ // CLI `--cluster auto` (the default) falls back to the recipe's `cluster`
|
|
|
|
|
+ // field — same behavior as the tmux path.
|
|
|
|
|
+ let cluster_name = if cluster_name == "auto" {
|
|
|
|
|
+ recipe.cluster.clone().unwrap_or_else(|| "auto".to_string())
|
|
|
|
|
+ } else {
|
|
|
|
|
+ cluster_name.to_string()
|
|
|
|
|
+ };
|
|
|
info!(
|
|
info!(
|
|
|
"{}",
|
|
"{}",
|
|
|
fluent_i18n::t!("recipe-starting", { "name" => rn, "engine" => re, "backend" => recipe.distributed_backend.map_or("none".to_string(), |b| b.to_string()) })
|
|
fluent_i18n::t!("recipe-starting", { "name" => rn, "engine" => re, "backend" => recipe.distributed_backend.map_or("none".to_string(), |b| b.to_string()) })
|
|
@@ -133,14 +140,14 @@ pub async fn serve(
|
|
|
crate::orchestrate::prepare_cluster_dry_run(
|
|
crate::orchestrate::prepare_cluster_dry_run(
|
|
|
config,
|
|
config,
|
|
|
&recipe_for_select,
|
|
&recipe_for_select,
|
|
|
- cluster_name,
|
|
|
|
|
|
|
+ &cluster_name,
|
|
|
node_name,
|
|
node_name,
|
|
|
)?
|
|
)?
|
|
|
} else {
|
|
} else {
|
|
|
prepare_cluster(
|
|
prepare_cluster(
|
|
|
config,
|
|
config,
|
|
|
&recipe_for_select,
|
|
&recipe_for_select,
|
|
|
- cluster_name,
|
|
|
|
|
|
|
+ &cluster_name,
|
|
|
node_name,
|
|
node_name,
|
|
|
&PrepareRequest {
|
|
&PrepareRequest {
|
|
|
prober: &SshProber,
|
|
prober: &SshProber,
|