Skip to content

Commit cef0fcd

Browse files
committed
Add the reconfigurator logic for measurements
1 parent be03e05 commit cef0fcd

25 files changed

+2207
-116
lines changed

dev-tools/reconfigurator-cli/src/lib.rs

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2000,9 +2000,15 @@ fn cmd_sled_update_install_dataset(
20002000
let mut state = sim.current_state().to_mut();
20012001
let system = state.system_mut();
20022002
let sled_id = args.sled_id.to_sled_id(system.description())?;
2003-
system
2004-
.description_mut()
2005-
.sled_set_zone_manifest(sled_id, description.to_boot_inventory())?;
2003+
system.description_mut().sled_set_zone_manifest(
2004+
sled_id,
2005+
description.to_zone_boot_inventory(),
2006+
)?;
2007+
2008+
system.description_mut().sled_set_measurement_manifest(
2009+
sled_id,
2010+
description.to_measurement_boot_inventory(),
2011+
)?;
20062012

20072013
sim.commit_and_bump(
20082014
format!(
@@ -3325,6 +3331,8 @@ fn mupdate_source_to_description(
33253331
let description = extract_tuf_repo_description(&sim.log, repo_path)?;
33263332
let mut sim_source = SimTufRepoSource::new(
33273333
description,
3334+
// XXX consider having these be different?
3335+
manifest_source,
33283336
manifest_source,
33293337
format!("from repo at {repo_path}"),
33303338
)?;
@@ -3348,6 +3356,7 @@ fn mupdate_source_to_description(
33483356
let mut sim_source = SimTufRepoSource::new(
33493357
desc.clone(),
33503358
manifest_source,
3359+
manifest_source,
33513360
"to target release".to_owned(),
33523361
)?;
33533362
sim_source.simulate_zone_errors(&source.with_zone_error)?;

dev-tools/reconfigurator-cli/tests/output/cmds-add-zones-with-mupdate-override-stdout

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,16 +83,18 @@ INFO blueprint mupdate override updated to match inventory, phase: do_plan_mupda
8383
, host_phase_2:
8484
- host phase 2 slot A: current contents (unchanged)
8585
- host phase 2 slot B: current contents (unchanged)
86-
86+
, measurements: (none)
8787
INFO no previous MGS update found as part of updating blueprint mupdate override to match inventory, phase: do_plan_mupdate_override, sled_id: 98e6b7c2-2efa-41ca-b20a-0a4d61102fe6
8888
INFO updating target release minimum generation based on new set-override actions, phase: do_plan_mupdate_override, current_generation: 1, new_generation: 3
8989
INFO performed noop zone image source checks on sled, sled_id: 2b8f0cb3-0295-4b3c-bc58-4fe88b57112c, num_total: 9, num_already_artifact: 0, num_eligible: 0, num_ineligible: 9
9090
INFO BootPartitionDetails inventory hash not found in TUF repo, ignoring for noop checks, sled_id: 2b8f0cb3-0295-4b3c-bc58-4fe88b57112c, slot: a, expected_hash: 0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a
9191
INFO BootPartitionDetails inventory hash not found in TUF repo, ignoring for noop checks, sled_id: 2b8f0cb3-0295-4b3c-bc58-4fe88b57112c, slot: b, expected_hash: 0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b
92+
INFO install dataset contained no entries in the measurement manifest, sled_id: 2b8f0cb3-0295-4b3c-bc58-4fe88b57112c, set: current
9293
INFO skipped noop image source check on sled, sled_id: 98e6b7c2-2efa-41ca-b20a-0a4d61102fe6, reason: remove_mupdate_override is set in the blueprint (2d0f6cbc-addc-47a2-962a-6a01e13376bf)
9394
INFO performed noop zone image source checks on sled, sled_id: d81c6a84-79b8-4958-ae41-ea46c9b19763, num_total: 8, num_already_artifact: 0, num_eligible: 0, num_ineligible: 8
9495
INFO BootPartitionDetails inventory hash not found in TUF repo, ignoring for noop checks, sled_id: d81c6a84-79b8-4958-ae41-ea46c9b19763, slot: a, expected_hash: 0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a
9596
INFO BootPartitionDetails inventory hash not found in TUF repo, ignoring for noop checks, sled_id: d81c6a84-79b8-4958-ae41-ea46c9b19763, slot: b, expected_hash: 0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b
97+
INFO install dataset contained no entries in the measurement manifest, sled_id: d81c6a84-79b8-4958-ae41-ea46c9b19763, set: current
9698
generated blueprint 8da82a8e-bf97-4fbd-8ddd-9f6462732cf1 based on parent blueprint dbcbd3d6-41ff-48ae-ac0b-1becc9b2fd21
9799
blueprint source: planner with report:
98100
planning report:
@@ -217,10 +219,12 @@ target number of Nexus zones: None -> 4
217219
INFO performed noop zone image source checks on sled, sled_id: 2b8f0cb3-0295-4b3c-bc58-4fe88b57112c, num_total: 9, num_already_artifact: 0, num_eligible: 0, num_ineligible: 9
218220
INFO BootPartitionDetails inventory hash not found in TUF repo, ignoring for noop checks, sled_id: 2b8f0cb3-0295-4b3c-bc58-4fe88b57112c, slot: a, expected_hash: 0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a
219221
INFO BootPartitionDetails inventory hash not found in TUF repo, ignoring for noop checks, sled_id: 2b8f0cb3-0295-4b3c-bc58-4fe88b57112c, slot: b, expected_hash: 0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b
222+
INFO install dataset contained no entries in the measurement manifest, sled_id: 2b8f0cb3-0295-4b3c-bc58-4fe88b57112c, set: current
220223
INFO skipped noop image source check on sled, sled_id: 98e6b7c2-2efa-41ca-b20a-0a4d61102fe6, reason: remove_mupdate_override is set in the blueprint (2d0f6cbc-addc-47a2-962a-6a01e13376bf)
221224
INFO performed noop zone image source checks on sled, sled_id: d81c6a84-79b8-4958-ae41-ea46c9b19763, num_total: 8, num_already_artifact: 0, num_eligible: 0, num_ineligible: 8
222225
INFO BootPartitionDetails inventory hash not found in TUF repo, ignoring for noop checks, sled_id: d81c6a84-79b8-4958-ae41-ea46c9b19763, slot: a, expected_hash: 0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a
223226
INFO BootPartitionDetails inventory hash not found in TUF repo, ignoring for noop checks, sled_id: d81c6a84-79b8-4958-ae41-ea46c9b19763, slot: b, expected_hash: 0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b
227+
INFO install dataset contained no entries in the measurement manifest, sled_id: d81c6a84-79b8-4958-ae41-ea46c9b19763, set: current
224228
generated blueprint 58d5e830-0884-47d8-a7cd-b2b3751adeb4 based on parent blueprint 8da82a8e-bf97-4fbd-8ddd-9f6462732cf1
225229
blueprint source: planner with report:
226230
planning report:
@@ -279,10 +283,12 @@ planner config updated:
279283
INFO performed noop zone image source checks on sled, sled_id: 2b8f0cb3-0295-4b3c-bc58-4fe88b57112c, num_total: 9, num_already_artifact: 0, num_eligible: 0, num_ineligible: 9
280284
INFO BootPartitionDetails inventory hash not found in TUF repo, ignoring for noop checks, sled_id: 2b8f0cb3-0295-4b3c-bc58-4fe88b57112c, slot: a, expected_hash: 0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a
281285
INFO BootPartitionDetails inventory hash not found in TUF repo, ignoring for noop checks, sled_id: 2b8f0cb3-0295-4b3c-bc58-4fe88b57112c, slot: b, expected_hash: 0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b
286+
INFO install dataset contained no entries in the measurement manifest, sled_id: 2b8f0cb3-0295-4b3c-bc58-4fe88b57112c, set: current
282287
INFO skipped noop image source check on sled, sled_id: 98e6b7c2-2efa-41ca-b20a-0a4d61102fe6, reason: remove_mupdate_override is set in the blueprint (2d0f6cbc-addc-47a2-962a-6a01e13376bf)
283288
INFO performed noop zone image source checks on sled, sled_id: d81c6a84-79b8-4958-ae41-ea46c9b19763, num_total: 8, num_already_artifact: 0, num_eligible: 0, num_ineligible: 8
284289
INFO BootPartitionDetails inventory hash not found in TUF repo, ignoring for noop checks, sled_id: d81c6a84-79b8-4958-ae41-ea46c9b19763, slot: a, expected_hash: 0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0a
285290
INFO BootPartitionDetails inventory hash not found in TUF repo, ignoring for noop checks, sled_id: d81c6a84-79b8-4958-ae41-ea46c9b19763, slot: b, expected_hash: 0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b
291+
INFO install dataset contained no entries in the measurement manifest, sled_id: d81c6a84-79b8-4958-ae41-ea46c9b19763, set: current
286292
generated blueprint af934083-59b5-4bf6-8966-6fb5292c29e1 based on parent blueprint 58d5e830-0884-47d8-a7cd-b2b3751adeb4
287293
blueprint source: planner with report:
288294
planning report:

0 commit comments

Comments
 (0)