diff --git a/dev-tools/omdb/src/bin/omdb/db.rs b/dev-tools/omdb/src/bin/omdb/db.rs index 9ab25e2ae13..5597241d5da 100644 --- a/dev-tools/omdb/src/bin/omdb/db.rs +++ b/dev-tools/omdb/src/bin/omdb/db.rs @@ -7350,30 +7350,28 @@ fn inv_collection_print_sleds(collection: &Collection) { "LAST RECONCILED CONFIG", &last_reconciliation.last_reconciled_config, ); - let disk_errs = collect_config_reconciler_errors( - &last_reconciliation.external_disks, - ); - let dataset_errs = collect_config_reconciler_errors( - &last_reconciliation.datasets, - ); - let zone_errs = collect_config_reconciler_errors( - &last_reconciliation.zones, - ); - for (label, errs) in [ - ("disk", disk_errs), - ("dataset", dataset_errs), - ("zone", zone_errs), - ] { - if errs.is_empty() { - println!(" all {label}s reconciled successfully"); - } else { - println!( - " {} {label} reconciliation errors:", - errs.len() - ); - for err in errs { - println!(" {err}"); - } + } + let disk_errs = collect_config_reconciler_errors( + &last_reconciliation.external_disks, + ); + let dataset_errs = + collect_config_reconciler_errors(&last_reconciliation.datasets); + let zone_errs = + collect_config_reconciler_errors(&last_reconciliation.zones); + for (label, errs) in [ + ("disk", disk_errs), + ("dataset", dataset_errs), + ("zone", zone_errs), + ] { + if errs.is_empty() { + println!(" all {label}s reconciled successfully"); + } else { + println!( + " {} {label} reconciliation errors:", + errs.len() + ); + for err in errs { + println!(" {err}"); } } } diff --git a/sled-agent/config-reconciler/src/reconciler_task/zones.rs b/sled-agent/config-reconciler/src/reconciler_task/zones.rs index 55fc044bedd..e0a6e370445 100644 --- a/sled-agent/config-reconciler/src/reconciler_task/zones.rs +++ b/sled-agent/config-reconciler/src/reconciler_task/zones.rs @@ -630,7 +630,16 @@ impl OmicronZone { ) .await } - ZoneState::FailedToStart(_) => { + // With these errors, we never even tried to start the zone, so + // there's no cleanup required: we can just return. + ZoneState::FailedToStart(ZoneStartError::TimeNotSynchronized) + | ZoneState::FailedToStart(ZoneStartError::CheckZoneExists(_)) + | ZoneState::FailedToStart(ZoneStartError::DatasetDependency(_)) => { + Ok(()) + } + ZoneState::FailedToStart(ZoneStartError::SledAgentStartFailed( + err, + )) => { // TODO-correctness What do we need to do to try to shut down a // zone that we tried to start? We need fine-grained status of // what startup things succeeded that need to be cleaned up. For @@ -639,7 +648,8 @@ impl OmicronZone { log, "need to shut down zone that failed to start, but this \ is currently unimplemented: assuming no cleanup work \ - required" + required"; + "start-err" => InlineErrorChain::new(err.as_ref()), ); Ok(()) }