@@ -176,7 +176,9 @@ fn diagnose_corrupted_state(gateway_name: &str) -> GatewayFailureDiagnosis {
176176 recovery_steps : vec ! [
177177 RecoveryStep :: with_command(
178178 "Destroy and recreate the gateway" ,
179- format!( "openshell gateway destroy {gateway_name} && openshell gateway start" ) ,
179+ format!(
180+ "openshell gateway destroy --name {gateway_name} && openshell gateway start"
181+ ) ,
180182 ) ,
181183 RecoveryStep :: with_command(
182184 "If that fails, remove the volume for a clean slate" ,
@@ -226,7 +228,7 @@ fn diagnose_port_conflict(_gateway_name: &str) -> GatewayFailureDiagnosis {
226228 ) ,
227229 RecoveryStep :: with_command(
228230 "Or stop other openshell gateways" ,
229- "openshell gateway list && openshell gateway destroy <name>" ,
231+ "openshell gateway list && openshell gateway destroy --name <name>" ,
230232 ) ,
231233 ] ,
232234 retryable : false ,
@@ -276,7 +278,9 @@ fn diagnose_k3s_dns_proxy_failure(gateway_name: &str) -> GatewayFailureDiagnosis
276278 RecoveryStep :: with_command( "Prune Docker networks" , "docker network prune -f" ) ,
277279 RecoveryStep :: with_command(
278280 "Destroy and recreate the gateway" ,
279- format!( "openshell gateway destroy {gateway_name} && openshell gateway start" ) ,
281+ format!(
282+ "openshell gateway destroy --name {gateway_name} && openshell gateway start"
283+ ) ,
280284 ) ,
281285 ] ,
282286 retryable : true ,
@@ -341,7 +345,9 @@ fn diagnose_node_pressure(gateway_name: &str) -> GatewayFailureDiagnosis {
341345 ) ,
342346 RecoveryStep :: with_command(
343347 "Destroy and recreate the gateway after freeing resources" ,
344- format!( "openshell gateway destroy {gateway_name} && openshell gateway start" ) ,
348+ format!(
349+ "openshell gateway destroy --name {gateway_name} && openshell gateway start"
350+ ) ,
345351 ) ,
346352 ] ,
347353 retryable : false ,
@@ -364,7 +370,9 @@ fn diagnose_missing_supervisor(gateway_name: &str) -> GatewayFailureDiagnosis {
364370 ) ,
365371 RecoveryStep :: with_command(
366372 "Destroy and recreate the gateway with the updated image" ,
367- format!( "openshell gateway destroy {gateway_name} && openshell gateway start" ) ,
373+ format!(
374+ "openshell gateway destroy --name {gateway_name} && openshell gateway start"
375+ ) ,
368376 ) ,
369377 RecoveryStep :: new(
370378 "Or set OPENSHELL_CLUSTER_IMAGE to a cluster image version that includes \
@@ -383,7 +391,7 @@ fn diagnose_certificate_issue(gateway_name: &str) -> GatewayFailureDiagnosis {
383391 . to_string ( ) ,
384392 recovery_steps : vec ! [ RecoveryStep :: with_command(
385393 "Destroy and recreate the gateway to regenerate certificates" ,
386- format!( "openshell gateway destroy {gateway_name} && openshell gateway start" ) ,
394+ format!( "openshell gateway destroy --name {gateway_name} && openshell gateway start" ) ,
387395 ) ] ,
388396 retryable : false ,
389397 }
@@ -436,7 +444,9 @@ pub fn generic_failure_diagnosis(gateway_name: &str) -> GatewayFailureDiagnosis
436444 recovery_steps : vec ! [
437445 RecoveryStep :: with_command(
438446 "Try destroying and recreating the gateway" ,
439- format!( "openshell gateway destroy {gateway_name} && openshell gateway start" ) ,
447+ format!(
448+ "openshell gateway destroy --name {gateway_name} && openshell gateway start"
449+ ) ,
440450 ) ,
441451 RecoveryStep :: with_command(
442452 "Check container logs for details" ,
0 commit comments