@@ -180,7 +180,9 @@ fn diagnose_corrupted_state(gateway_name: &str) -> GatewayFailureDiagnosis {
180180 recovery_steps : vec ! [
181181 RecoveryStep :: with_command(
182182 "Destroy and recreate the gateway" ,
183- format!( "openshell gateway destroy {gateway_name} && openshell gateway start" ) ,
183+ format!(
184+ "openshell gateway destroy --name {gateway_name} && openshell gateway start"
185+ ) ,
184186 ) ,
185187 RecoveryStep :: with_command(
186188 "If that fails, remove the volume for a clean slate" ,
@@ -230,7 +232,7 @@ fn diagnose_port_conflict(_gateway_name: &str) -> GatewayFailureDiagnosis {
230232 ) ,
231233 RecoveryStep :: with_command(
232234 "Or stop other openshell gateways" ,
233- "openshell gateway list && openshell gateway destroy <name>" ,
235+ "openshell gateway list && openshell gateway destroy --name <name>" ,
234236 ) ,
235237 ] ,
236238 retryable : false ,
@@ -283,7 +285,9 @@ fn diagnose_k3s_dns_proxy_failure(gateway_name: &str) -> GatewayFailureDiagnosis
283285 RecoveryStep :: with_command( "Prune Docker networks" , "docker network prune -f" ) ,
284286 RecoveryStep :: with_command(
285287 "Destroy and recreate the gateway" ,
286- format!( "openshell gateway destroy {gateway_name} && openshell gateway start" ) ,
288+ format!(
289+ "openshell gateway destroy --name {gateway_name} && openshell gateway start"
290+ ) ,
287291 ) ,
288292 ] ,
289293 retryable : true ,
@@ -342,7 +346,9 @@ fn diagnose_node_pressure(gateway_name: &str) -> GatewayFailureDiagnosis {
342346 RecoveryStep :: new( "Increase Docker resource allocation or free resources on the host" ) ,
343347 RecoveryStep :: with_command(
344348 "Destroy and recreate the gateway after freeing resources" ,
345- format!( "openshell gateway destroy {gateway_name} && openshell gateway start" ) ,
349+ format!(
350+ "openshell gateway destroy --name {gateway_name} && openshell gateway start"
351+ ) ,
346352 ) ,
347353 ] ,
348354 retryable : false ,
@@ -365,7 +371,9 @@ fn diagnose_missing_supervisor(gateway_name: &str) -> GatewayFailureDiagnosis {
365371 ) ,
366372 RecoveryStep :: with_command(
367373 "Destroy and recreate the gateway with the updated image" ,
368- format!( "openshell gateway destroy {gateway_name} && openshell gateway start" ) ,
374+ format!(
375+ "openshell gateway destroy --name {gateway_name} && openshell gateway start"
376+ ) ,
369377 ) ,
370378 RecoveryStep :: new(
371379 "Or set OPENSHELL_CLUSTER_IMAGE to a cluster image version that includes \
@@ -384,7 +392,7 @@ fn diagnose_certificate_issue(gateway_name: &str) -> GatewayFailureDiagnosis {
384392 . to_string ( ) ,
385393 recovery_steps : vec ! [ RecoveryStep :: with_command(
386394 "Destroy and recreate the gateway to regenerate certificates" ,
387- format!( "openshell gateway destroy {gateway_name} && openshell gateway start" ) ,
395+ format!( "openshell gateway destroy --name {gateway_name} && openshell gateway start" ) ,
388396 ) ] ,
389397 retryable : false ,
390398 }
@@ -443,7 +451,9 @@ pub fn generic_failure_diagnosis(gateway_name: &str) -> GatewayFailureDiagnosis
443451 recovery_steps : vec ! [
444452 RecoveryStep :: with_command(
445453 "Try destroying and recreating the gateway" ,
446- format!( "openshell gateway destroy {gateway_name} && openshell gateway start" ) ,
454+ format!(
455+ "openshell gateway destroy --name {gateway_name} && openshell gateway start"
456+ ) ,
447457 ) ,
448458 RecoveryStep :: with_command(
449459 "Check container logs for details" ,
0 commit comments