Skip to content

Commit

Permalink
Add UpdateError::RollbackProtection
Browse files Browse the repository at this point in the history
Updating to epoch branch of hubtools. No code impact
  • Loading branch information
lzrd committed Aug 16, 2024
1 parent 8b80941 commit 2d9c8eb
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
12 changes: 6 additions & 6 deletions Cargo.lock

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

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ resolver = "2"

[workspace.dependencies]
tlvc = { git = "https://github.com/oxidecomputer/tlvc.git", branch = "main" }
hubtools = { git = "https://github.com/oxidecomputer/hubtools.git", branch = "main"}
# TODO: Change to main branch before merge
hubtools = { git = "https://github.com/oxidecomputer/hubtools.git", branch = "epoch"}
slog-error-chain = { git = "https://github.com/oxidecomputer/slog-error-chain.git", branch = "main", features = ["derive"] }

anyhow = "1.0"
Expand Down
4 changes: 4 additions & 0 deletions gateway-messages/src/sp_to_mgs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1170,6 +1170,7 @@ pub enum UpdateError {
ImageMismatch,
SignatureNotValidated,
VersionNotSupported,
RollbackProtection,
}

impl fmt::Display for UpdateError {
Expand Down Expand Up @@ -1229,6 +1230,9 @@ impl fmt::Display for UpdateError {
Self::InvalidComponent => {
write!(f, "invalid component for operation")
}
Self::RollbackProtection => {
write!(f, "invalid epoch compared to active image")
}
}
}
}
Expand Down

0 comments on commit 2d9c8eb

Please sign in to comment.