Skip to content

Commit 50c1169

Browse files
committed
Don't trust inventory zones' image_source
1 parent 194a8a3 commit 50c1169

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

nexus/db-model/src/inventory.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1632,6 +1632,7 @@ impl InvOmicronZone {
16321632
.filesystem_pool
16331633
.map(|id| ZpoolName::new_external(id.into())),
16341634
zone_type,
1635+
// FIXME <https://github.com/oxidecomputer/omicron/issues/8084>
16351636
image_source: OmicronZoneImageSource::InstallDataset,
16361637
})
16371638
}

nexus/reconfigurator/planning/src/planner.rs

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -887,27 +887,23 @@ impl<'a> Planner<'a> {
887887
.map(|(id, _details)| id)
888888
.collect::<Vec<_>>();
889889

890-
// Wait for all current zones to become up-to-date.
890+
// Wait for all current zones to appear in the inventory.
891+
// It would be nice if we could check their image source,
892+
// but the inventory doesn't report that correctly: see
893+
// <https://github.com/oxidecomputer/omicron/issues/8084>.
891894
let inventory_zones = self
892895
.inventory
893896
.all_omicron_zones()
894897
.map(|z| (z.id, z))
895898
.collect::<BTreeMap<_, _>>();
896899
for sled_id in sleds.iter().cloned() {
897-
if self
900+
if !self
898901
.blueprint
899902
.current_sled_zones(
900903
sled_id,
901904
BlueprintZoneDisposition::is_in_service,
902905
)
903-
.any(|zone| {
904-
inventory_zones
905-
.get(&zone.id)
906-
.map(|z| {
907-
z.image_source != zone.image_source.clone().into()
908-
})
909-
.unwrap_or(false)
910-
})
906+
.all(|zone| inventory_zones.contains_key(&zone.id))
911907
{
912908
info!(
913909
self.log, "zones not yet up-to-date";

0 commit comments

Comments
 (0)