From 074bbfb73227f24a14da83a332b57ad2ad52c2a8 Mon Sep 17 00:00:00 2001 From: karencfv Date: Mon, 28 Apr 2025 20:18:46 +1200 Subject: [PATCH] [mgs] information about RoT updates --- dev-tools/reconfigurator-sp-updater/src/main.rs | 2 ++ nexus/mgs-updates/src/driver.rs | 6 ++++++ nexus/mgs-updates/src/sp_updater.rs | 7 ++++++- nexus/types/src/deployment.rs | 6 ++++++ 4 files changed, 20 insertions(+), 1 deletion(-) diff --git a/dev-tools/reconfigurator-sp-updater/src/main.rs b/dev-tools/reconfigurator-sp-updater/src/main.rs index a95b9772095..2c2c6a32556 100644 --- a/dev-tools/reconfigurator-sp-updater/src/main.rs +++ b/dev-tools/reconfigurator-sp-updater/src/main.rs @@ -322,6 +322,8 @@ fn cmd_config( expected_active_version, expected_inactive_version, )?; } + // TODO-K: Print preconditions + PendingMgsUpdateDetails::RoT {} => todo!(), } writeln!(&mut s)?; diff --git a/nexus/mgs-updates/src/driver.rs b/nexus/mgs-updates/src/driver.rs index 0148a498ce3..b2ad01c98db 100644 --- a/nexus/mgs-updates/src/driver.rs +++ b/nexus/mgs-updates/src/driver.rs @@ -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(); diff --git a/nexus/mgs-updates/src/sp_updater.rs b/nexus/mgs-updates/src/sp_updater.rs index b66e8f94c64..9ba864f9bab 100644 --- a/nexus/mgs-updates/src/sp_updater.rs +++ b/nexus/mgs-updates/src/sp_updater.rs @@ -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(), diff --git a/nexus/types/src/deployment.rs b/nexus/types/src/deployment.rs index 769f74a46f7..3e96951bacf 100644 --- a/nexus/types/src/deployment.rs +++ b/nexus/types/src/deployment.rs @@ -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 { @@ -1283,6 +1287,8 @@ impl slog::KV for PendingMgsUpdateDetails { &format!("{:?}", expected_inactive_version), ) } + // TODO-K: Set serialiser information + PendingMgsUpdateDetails::RoT {} => todo!(), } } }