Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 22 additions & 24 deletions dev-tools/omdb/src/bin/omdb/db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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}");
}
}
}
Expand Down
14 changes: 12 additions & 2 deletions sled-agent/config-reconciler/src/reconciler_task/zones.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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(())
}
Expand Down
Loading