Skip to content

wicket: add rack-update status command#10230

Merged
adamlouis merged 9 commits intomainfrom
adamlouis/rackupdate-status
Apr 15, 2026
Merged

wicket: add rack-update status command#10230
adamlouis merged 9 commits intomainfrom
adamlouis/rackupdate-status

Conversation

@adamlouis
Copy link
Copy Markdown
Contributor

Resolves #10146

Add command rack-update status to the wicket CLI, which reports the current update status of the rack. Supports human-readable output (default) or JSON (--json). Reads from the wicketd API by default, or from a file/stdin via --file, which enables usage with the output of rack-update debug-dump.

This comment was marked as outdated.

@oxidecomputer oxidecomputer deleted a comment from Copilot AI Apr 6, 2026
@oxidecomputer oxidecomputer deleted a comment from Copilot AI Apr 6, 2026
Comment thread wicket/src/cli/rack_update.rs Outdated
Comment thread wicket/src/cli/rack_update.rs Outdated
Comment thread wicket/src/cli/rack_update.rs Outdated
Copy, Clone, Debug, PartialEq, Eq, Serialize, Deserialize, JsonSchema,
)]
#[serde(rename_all = "snake_case")]
pub enum UpdateState {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was going to suggest calling this ComponentUpdateState to avoid confusion with the existing UpdateState, but that doesn't quite work here because we also use the same enum to represent the overall update state. I'm not quite sure what to call this.

Comment thread wicket/src/cli/rack_update.rs Outdated
Comment on lines +451 to +454
TerminalKind::Failed => UpdateState::Failed,
TerminalKind::Aborted => {
UpdateState::Aborted
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we report the failure/abort message in these two cases?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done as 6826510 (am happy to change / rename)

Comment thread wicket-common/src/rack_update.rs
Comment thread wicket/src/cli/rack_update.rs Outdated
Comment thread wicket-common/src/rack_update.rs Outdated
Comment thread wicket-common/src/rack_update.rs Outdated
Comment thread wicket-common/src/rack_update.rs Outdated
// If *all* components are not started, the update is not started.
UpdateState::NotStarted
} else {
} else
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need a { here.

Copy link
Copy Markdown
Contributor

@sunshowers sunshowers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this seems mostly good to go. Just have a comment about adding an integration test if possible.

Comment on lines +140 to +142
/// The status of a rack update.
#[derive(Clone, Debug, Serialize, Deserialize, JsonSchema)]
pub struct RackUpdateStatus {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wondering if you can extend one of the tests in https://github.com/oxidecomputer/omicron/blob/main/wicketd/tests/integration_tests/updates.rs to get a basic smoke test of the rack update status going.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good suggestion, added here! aa374c3

@adamlouis adamlouis requested a review from sunshowers April 15, 2026 00:10
Copy link
Copy Markdown
Contributor

@sunshowers sunshowers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is awesome, thanks! Presumably you've tested this end-to-end and know that the information here is sufficient for automated MUPdate.

@adamlouis adamlouis merged commit fdda81e into main Apr 15, 2026
17 checks passed
@adamlouis adamlouis deleted the adamlouis/rackupdate-status branch April 15, 2026 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve programmatic access of MUPdate information through wicket

4 participants