Skip to content

[mgs] Information about RoT updates #8054

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

Draft
wants to merge 1 commit 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
2 changes: 2 additions & 0 deletions dev-tools/reconfigurator-sp-updater/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,8 @@ fn cmd_config(
expected_active_version, expected_inactive_version,
)?;
}
// TODO-K: Print preconditions
PendingMgsUpdateDetails::RoT {} => todo!(),
}

writeln!(&mut s)?;
Expand Down
6 changes: 6 additions & 0 deletions nexus/mgs-updates/src/driver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,12 @@ impl MgsUpdateDriver {

(sp_update, Box::new(ReconfiguratorSpUpdater {}))
}
// TODO-K: fill in necessary component information
nexus_types::deployment::PendingMgsUpdateDetails::RoT {
..
} => {
todo!()
}
};

let baseboard_id = baseboard_id.clone();
Expand Down
7 changes: 6 additions & 1 deletion nexus/mgs-updates/src/sp_updater.rs
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,12 @@ impl SpComponentUpdateHelper for ReconfiguratorSpUpdater {
let PendingMgsUpdateDetails::Sp {
expected_active_version,
expected_inactive_version,
} = &update.details;
} = &update.details
else {
unreachable!(
"pending MGS update details will always be for the SP"
);
};
if caboose.version != expected_active_version.to_string() {
return Err(PrecheckError::WrongActiveVersion {
expected: expected_active_version.clone(),
Expand Down
6 changes: 6 additions & 0 deletions nexus/types/src/deployment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1260,6 +1260,10 @@ pub enum PendingMgsUpdateDetails {
/// expected contents of the inactive slot
expected_inactive_version: ExpectedVersion,
},
/// the RoT is being updated
RoT {
// TODO-K: Fill in fields
},
}

impl slog::KV for PendingMgsUpdateDetails {
Expand All @@ -1283,6 +1287,8 @@ impl slog::KV for PendingMgsUpdateDetails {
&format!("{:?}", expected_inactive_version),
)
}
// TODO-K: Set serialiser information
PendingMgsUpdateDetails::RoT {} => todo!(),
}
}
}
Expand Down
Loading