oxidecomputer / omicron

Omicron: Oxide control plane
Mozilla Public License 2.0
252 stars 40 forks source link

Blueprint structure allows a variety of "illegal" combinations #7078

Open jgallagher opened 1 week ago

jgallagher commented 1 week ago

Blueprint currently has four different maps, all keyed by sled ID: https://github.com/oxidecomputer/omicron/blob/7cf372d7aca20d8cbfd18739a1d4cad37dda034a/nexus/types/src/deployment.rs#L144-L163

In general we would expect all those maps to have the same keys, but in practice that isn't true. A couple examples:

I think (?) we should probably only have one map here, keyed by sled ID, with values that encompass all the blueprint details for a single sled (today: state + zones + disks + datasets, growing in the future to support update versioning as needed). This may require some fundamental rework of BlueprintBuilder and possibly the planner, as today they manage these maps mostly independently (which is problematic!).