Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#5333 3/6] Region snapshot replacement start #6294

Merged
merged 14 commits into from
Aug 14, 2024
Merged
162 changes: 159 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,7 @@ crossterm = { version = "0.28.1", features = ["event-stream"] }
crucible-agent-client = { git = "https://github.com/oxidecomputer/crucible", rev = "e58ca3693cb9ce0438947beba10e97ee38a0966b" }
crucible-pantry-client = { git = "https://github.com/oxidecomputer/crucible", rev = "e58ca3693cb9ce0438947beba10e97ee38a0966b" }
crucible-smf = { git = "https://github.com/oxidecomputer/crucible", rev = "e58ca3693cb9ce0438947beba10e97ee38a0966b" }
crucible-common = { git = "https://github.com/oxidecomputer/crucible", rev = "e58ca3693cb9ce0438947beba10e97ee38a0966b" }
csv = "1.3.0"
curve25519-dalek = "4"
datatest-stable = "0.2.9"
Expand Down
33 changes: 33 additions & 0 deletions dev-tools/omdb/src/bin/omdb/nexus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ use nexus_saga_recovery::LastPass;
use nexus_types::deployment::Blueprint;
use nexus_types::internal_api::background::LookupRegionPortStatus;
use nexus_types::internal_api::background::RegionReplacementDriverStatus;
use nexus_types::internal_api::background::RegionSnapshotReplacementStartStatus;
use nexus_types::inventory::BaseboardId;
use omicron_uuid_kinds::CollectionUuid;
use omicron_uuid_kinds::GenericUuid;
Expand Down Expand Up @@ -1332,6 +1333,38 @@ fn print_task_details(bgtask: &BackgroundTask, details: &serde_json::Value) {
}
}
};
} else if name == "region_snapshot_replacement" {
match serde_json::from_value::<RegionSnapshotReplacementStartStatus>(
details.clone(),
) {
Err(error) => eprintln!(
"warning: failed to interpret task details: {:?}: {:?}",
error, details
),

Ok(status) => {
println!(
" total requests created ok: {}",
status.requests_created_ok.len(),
);
for line in &status.requests_created_ok {
println!(" > {line}");
}

println!(
" total start saga invoked ok: {}",
status.start_invoked_ok.len(),
);
for line in &status.start_invoked_ok {
println!(" > {line}");
}

println!(" errors: {}", status.errors.len());
for line in &status.errors {
println!(" > {line}");
}
}
}
} else {
println!(
"warning: unknown background task: {:?} \
Expand Down
12 changes: 12 additions & 0 deletions dev-tools/omdb/tests/env.out
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,10 @@ task: "region_replacement_driver"
drive region replacements forward to completion


task: "region_snapshot_replacement_start"
detect if region snapshots need replacement and begin the process


task: "saga_recovery"
recovers sagas assigned to this Nexus

Expand Down Expand Up @@ -276,6 +280,10 @@ task: "region_replacement_driver"
drive region replacements forward to completion


task: "region_snapshot_replacement_start"
detect if region snapshots need replacement and begin the process


task: "saga_recovery"
recovers sagas assigned to this Nexus

Expand Down Expand Up @@ -412,6 +420,10 @@ task: "region_replacement_driver"
drive region replacements forward to completion


task: "region_snapshot_replacement_start"
detect if region snapshots need replacement and begin the process


task: "saga_recovery"
recovers sagas assigned to this Nexus

Expand Down
Loading
Loading