From a084ad55c0cd07f62703cff8c4fc220b5c652c99 Mon Sep 17 00:00:00 2001 From: Sean Klein Date: Tue, 23 Sep 2025 09:01:30 -0700 Subject: [PATCH 1/4] [planner] Identify when zone update is blocked on inventory --- .../tests/output/cmds-mupdate-update-flow-stdout | 1 + .../tests/output/cmds-target-release-stdout | 3 +++ nexus/reconfigurator/planning/src/planner.rs | 8 +++++--- nexus/types/src/deployment/planning_report.rs | 4 ++++ 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/dev-tools/reconfigurator-cli/tests/output/cmds-mupdate-update-flow-stdout b/dev-tools/reconfigurator-cli/tests/output/cmds-mupdate-update-flow-stdout index 6f14309436f..0e5d6bf8d36 100644 --- a/dev-tools/reconfigurator-cli/tests/output/cmds-mupdate-update-flow-stdout +++ b/dev-tools/reconfigurator-cli/tests/output/cmds-mupdate-update-flow-stdout @@ -2035,6 +2035,7 @@ planning report for blueprint 12d602a6-5ab4-487a-b94e-eb30cdf30300: * noop converting host phase 2 slot B to Artifact on sled 98e6b7c2-2efa-41ca-b20a-0a4d61102fe6 * noop converting host phase 2 slot B to Artifact on sled d81c6a84-79b8-4958-ae41-ea46c9b19763 * only placed 0/2 desired nexus zones +* zone updates waiting on zone propagation to inventory * waiting to update top-level nexus_generation: some non-Nexus zone are not yet updated diff --git a/dev-tools/reconfigurator-cli/tests/output/cmds-target-release-stdout b/dev-tools/reconfigurator-cli/tests/output/cmds-target-release-stdout index 30a7e7e967d..1fef963e368 100644 --- a/dev-tools/reconfigurator-cli/tests/output/cmds-target-release-stdout +++ b/dev-tools/reconfigurator-cli/tests/output/cmds-target-release-stdout @@ -2266,6 +2266,7 @@ planning report for blueprint b2295597-5788-482e-acf9-1731ec63fbd2: * waiting for NTP zones to appear in inventory on sleds: 2b8f0cb3-0295-4b3c-bc58-4fe88b57112c * sleds getting NTP zones and which have other services already, making them eligible for discretionary zones: 2b8f0cb3-0295-4b3c-bc58-4fe88b57112c * missing NTP zone on sled 2b8f0cb3-0295-4b3c-bc58-4fe88b57112c +* zone updates waiting on zone propagation to inventory * waiting to update top-level nexus_generation: some non-Nexus zone are not yet updated @@ -4311,6 +4312,7 @@ planning report for blueprint 316ccd9e-5c53-46c3-a2e9-20c3867b7111: * waiting for NTP zones to appear in inventory on sleds: 98e6b7c2-2efa-41ca-b20a-0a4d61102fe6 * sleds getting NTP zones and which have other services already, making them eligible for discretionary zones: 98e6b7c2-2efa-41ca-b20a-0a4d61102fe6 * missing NTP zone on sled 98e6b7c2-2efa-41ca-b20a-0a4d61102fe6 +* zone updates waiting on zone propagation to inventory * waiting to update top-level nexus_generation: some non-Nexus zone are not yet updated @@ -6037,6 +6039,7 @@ planning report for blueprint 90650737-8142-47a6-9a48-a10efc487e57: * waiting for NTP zones to appear in inventory on sleds: d81c6a84-79b8-4958-ae41-ea46c9b19763 * sleds getting NTP zones and which have other services already, making them eligible for discretionary zones: d81c6a84-79b8-4958-ae41-ea46c9b19763 * missing NTP zone on sled d81c6a84-79b8-4958-ae41-ea46c9b19763 +* zone updates waiting on zone propagation to inventory * waiting to update top-level nexus_generation: some non-Nexus zone are not yet updated diff --git a/nexus/reconfigurator/planning/src/planner.rs b/nexus/reconfigurator/planning/src/planner.rs index 885908c7208..ce1cb6abfb2 100644 --- a/nexus/reconfigurator/planning/src/planner.rs +++ b/nexus/reconfigurator/planning/src/planner.rs @@ -1543,8 +1543,6 @@ impl<'a> Planner<'a> { &mut self, mgs_updates: &PlanningMgsUpdatesStepReport, ) -> Result { - let mut report = PlanningZoneUpdatesStepReport::new(); - let zones_currently_updating = self.get_zones_not_yet_propagated_to_inventory(); if !zones_currently_updating.is_empty() { @@ -1552,9 +1550,13 @@ impl<'a> Planner<'a> { self.log, "some zones not yet up-to-date"; "zones_currently_updating" => ?zones_currently_updating, ); - return Ok(report); + return Ok(PlanningZoneUpdatesStepReport::waiting_on( + ZoneUpdatesWaitingOn::InventoryPropagation, + )); } + let mut report = PlanningZoneUpdatesStepReport::new(); + // Find the zones with out-of-date images let out_of_date_zones = self.get_out_of_date_zones(); for (sled_id, zone, desired_image) in out_of_date_zones.iter() { diff --git a/nexus/types/src/deployment/planning_report.rs b/nexus/types/src/deployment/planning_report.rs index 8880fd65847..4d6c5873b50 100644 --- a/nexus/types/src/deployment/planning_report.rs +++ b/nexus/types/src/deployment/planning_report.rs @@ -1021,6 +1021,9 @@ pub enum ZoneUpdatesWaitingOn { /// Waiting on discretionary zone placement. DiscretionaryZones, + /// Waiting on zones to propagate to inventory, + InventoryPropagation, + /// Waiting on updates to RoT / SP / Host OS / etc. PendingMgsUpdates, @@ -1032,6 +1035,7 @@ impl ZoneUpdatesWaitingOn { pub fn as_str(&self) -> &'static str { match self { Self::DiscretionaryZones => "discretionary zones", + Self::InventoryPropagation => "zone propagation to inventory", Self::PendingMgsUpdates => { "pending MGS updates (RoT / SP / Host OS / etc.)" } From 3781104cfda3c24db55bb0ab55a118002cd1c28a Mon Sep 17 00:00:00 2001 From: Sean Klein Date: Tue, 23 Sep 2025 10:58:41 -0700 Subject: [PATCH 2/4] openapi update --- openapi/nexus-internal.json | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/openapi/nexus-internal.json b/openapi/nexus-internal.json index 8c8f8957d77..b2c4c933f0d 100644 --- a/openapi/nexus-internal.json +++ b/openapi/nexus-internal.json @@ -9955,6 +9955,21 @@ "type" ] }, + { + "description": "Waiting on zones to propagate to inventory,", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "inventory_propagation" + ] + } + }, + "required": [ + "type" + ] + }, { "description": "Waiting on updates to RoT / SP / Host OS / etc.", "type": "object", From 344a497215495c7c2fa290362be8d8bc68ec5eda Mon Sep 17 00:00:00 2001 From: Sean Klein Date: Wed, 24 Sep 2025 08:41:21 -0700 Subject: [PATCH 3/4] Update nexus/types/src/deployment/planning_report.rs Co-authored-by: Alex Plotnick --- nexus/types/src/deployment/planning_report.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nexus/types/src/deployment/planning_report.rs b/nexus/types/src/deployment/planning_report.rs index 4d6c5873b50..6b334958da1 100644 --- a/nexus/types/src/deployment/planning_report.rs +++ b/nexus/types/src/deployment/planning_report.rs @@ -1021,7 +1021,7 @@ pub enum ZoneUpdatesWaitingOn { /// Waiting on discretionary zone placement. DiscretionaryZones, - /// Waiting on zones to propagate to inventory, + /// Waiting on zones to propagate to inventory. InventoryPropagation, /// Waiting on updates to RoT / SP / Host OS / etc. From fc33fa40a75809d7202298a9e05dca53775fca38 Mon Sep 17 00:00:00 2001 From: Sean Klein Date: Wed, 24 Sep 2025 08:47:09 -0700 Subject: [PATCH 4/4] openapi --- openapi/nexus-internal.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openapi/nexus-internal.json b/openapi/nexus-internal.json index b2c4c933f0d..08e477a5f99 100644 --- a/openapi/nexus-internal.json +++ b/openapi/nexus-internal.json @@ -9956,7 +9956,7 @@ ] }, { - "description": "Waiting on zones to propagate to inventory,", + "description": "Waiting on zones to propagate to inventory.", "type": "object", "properties": { "type": {