Skip to content

Commit 6419ef0

Browse files
smkleinplotnick
andauthored
[planner] Identify when zone update is blocked on inventory (#9063)
Fixes #9047 --------- Co-authored-by: Alex Plotnick <[email protected]>
1 parent 2648592 commit 6419ef0

File tree

5 files changed

+28
-3
lines changed

5 files changed

+28
-3
lines changed

dev-tools/reconfigurator-cli/tests/output/cmds-mupdate-update-flow-stdout

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2186,6 +2186,7 @@ planning report:
21862186
* noop converting host phase 2 slot B to Artifact on sled 98e6b7c2-2efa-41ca-b20a-0a4d61102fe6
21872187
* noop converting host phase 2 slot B to Artifact on sled d81c6a84-79b8-4958-ae41-ea46c9b19763
21882188
* only placed 0/1 desired nexus zones
2189+
* zone updates waiting on zone propagation to inventory
21892190
* waiting to update top-level nexus_generation: some non-Nexus zone are not yet updated
21902191

21912192

dev-tools/reconfigurator-cli/tests/output/cmds-target-release-stdout

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3237,6 +3237,7 @@ planning report:
32373237
* waiting for NTP zones to appear in inventory on sleds: 2b8f0cb3-0295-4b3c-bc58-4fe88b57112c
32383238
* sleds getting NTP zones and which have other services already, making them eligible for discretionary zones: 2b8f0cb3-0295-4b3c-bc58-4fe88b57112c
32393239
* missing NTP zone on sled 2b8f0cb3-0295-4b3c-bc58-4fe88b57112c
3240+
* zone updates waiting on zone propagation to inventory
32403241
* waiting to update top-level nexus_generation: some non-Nexus zone are not yet updated
32413242

32423243

@@ -5327,6 +5328,7 @@ planning report:
53275328
* waiting for NTP zones to appear in inventory on sleds: 98e6b7c2-2efa-41ca-b20a-0a4d61102fe6
53285329
* sleds getting NTP zones and which have other services already, making them eligible for discretionary zones: 98e6b7c2-2efa-41ca-b20a-0a4d61102fe6
53295330
* missing NTP zone on sled 98e6b7c2-2efa-41ca-b20a-0a4d61102fe6
5331+
* zone updates waiting on zone propagation to inventory
53305332
* waiting to update top-level nexus_generation: some non-Nexus zone are not yet updated
53315333

53325334

@@ -7092,6 +7094,7 @@ planning report:
70927094
* waiting for NTP zones to appear in inventory on sleds: d81c6a84-79b8-4958-ae41-ea46c9b19763
70937095
* sleds getting NTP zones and which have other services already, making them eligible for discretionary zones: d81c6a84-79b8-4958-ae41-ea46c9b19763
70947096
* missing NTP zone on sled d81c6a84-79b8-4958-ae41-ea46c9b19763
7097+
* zone updates waiting on zone propagation to inventory
70957098
* waiting to update top-level nexus_generation: some non-Nexus zone are not yet updated
70967099

70977100

nexus/reconfigurator/planning/src/planner.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1545,18 +1545,20 @@ impl<'a> Planner<'a> {
15451545
&mut self,
15461546
mgs_updates: &PlanningMgsUpdatesStepReport,
15471547
) -> Result<PlanningZoneUpdatesStepReport, Error> {
1548-
let mut report = PlanningZoneUpdatesStepReport::new();
1549-
15501548
let zones_currently_updating =
15511549
self.get_zones_not_yet_propagated_to_inventory();
15521550
if !zones_currently_updating.is_empty() {
15531551
info!(
15541552
self.log, "some zones not yet up-to-date";
15551553
"zones_currently_updating" => ?zones_currently_updating,
15561554
);
1557-
return Ok(report);
1555+
return Ok(PlanningZoneUpdatesStepReport::waiting_on(
1556+
ZoneUpdatesWaitingOn::InventoryPropagation,
1557+
));
15581558
}
15591559

1560+
let mut report = PlanningZoneUpdatesStepReport::new();
1561+
15601562
// Find the zones with out-of-date images
15611563
let out_of_date_zones = self.get_out_of_date_zones();
15621564
for (sled_id, zone, desired_image) in out_of_date_zones.iter() {

nexus/types/src/deployment/planning_report.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1023,6 +1023,9 @@ pub enum ZoneUpdatesWaitingOn {
10231023
/// Waiting on discretionary zone placement.
10241024
DiscretionaryZones,
10251025

1026+
/// Waiting on zones to propagate to inventory.
1027+
InventoryPropagation,
1028+
10261029
/// Waiting on updates to RoT / SP / Host OS / etc.
10271030
PendingMgsUpdates,
10281031

@@ -1034,6 +1037,7 @@ impl ZoneUpdatesWaitingOn {
10341037
pub fn as_str(&self) -> &'static str {
10351038
match self {
10361039
Self::DiscretionaryZones => "discretionary zones",
1040+
Self::InventoryPropagation => "zone propagation to inventory",
10371041
Self::PendingMgsUpdates => {
10381042
"pending MGS updates (RoT / SP / Host OS / etc.)"
10391043
}

openapi/nexus-internal.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6013,6 +6013,21 @@
60136013
"type"
60146014
]
60156015
},
6016+
{
6017+
"description": "Waiting on zones to propagate to inventory.",
6018+
"type": "object",
6019+
"properties": {
6020+
"type": {
6021+
"type": "string",
6022+
"enum": [
6023+
"inventory_propagation"
6024+
]
6025+
}
6026+
},
6027+
"required": [
6028+
"type"
6029+
]
6030+
},
60166031
{
60176032
"description": "Waiting on updates to RoT / SP / Host OS / etc.",
60186033
"type": "object",

0 commit comments

Comments
 (0)