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

add omdb commands for printing basic saga information #7695

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
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
1 change: 1 addition & 0 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 dev-tools/omdb/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ serde_json.workspace = true
sled-agent-client.workspace = true
slog.workspace = true
slog-error-chain.workspace = true
steno.workspace = true
strum.workspace = true
supports-color.workspace = true
tabled.workspace = true
Expand Down
7 changes: 7 additions & 0 deletions dev-tools/omdb/src/bin/omdb/db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,8 @@ use strum::IntoEnumIterator;
use tabled::Tabled;
use uuid::Uuid;

mod saga;

const NO_ACTIVE_PROPOLIS_MSG: &str = "<no active Propolis>";
const NOT_ON_SLED_MSG: &str = "<not on any sled>";

Expand Down Expand Up @@ -335,6 +337,8 @@ enum DbCommands {
/// Query for information about region snapshot replacements, optionally
/// manually triggering one.
RegionSnapshotReplacement(RegionSnapshotReplacementArgs),
/// Print information about sagas
Saga(saga::SagaArgs),
/// Print information about sleds
Sleds(SledsArgs),
/// Print information about customer instances.
Expand Down Expand Up @@ -1023,6 +1027,9 @@ impl DbArgs {
)
.await
}
DbCommands::Saga(args) => {
args.exec(&opctx, &datastore).await
}
DbCommands::Sleds(args) => {
cmd_db_sleds(&opctx, &datastore, &fetch_opts, args).await
}
Expand Down
Loading
Loading