oxidecomputer / oxidecomputer/omicron

BlueprintZoneConfig: track dataset IDs explicitly

Open
#7,214 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
572
Forks
97
Avg merge
2d 12h
Merged PRs (30d)
96

Description

Today, BlueprintZoneConfig contains an optional filesystem_zpool: https://github.com/oxidecomputer/omicron/blob/9b662ea823d4899702fb3ee7799d843d440dd746/nexus/types/src/deployment.rs#L726-L727

and specific zone types that have durable datasets likewise track which zpool their dataset is on. Once R12 is out the door, we'll know that all current target blueprints have fully populated the blueprint_datasets map.

We have a requirement that there is at most one dataset of a given DatasetKind in service on any given Zpool. This allows us to map from a zone's filesystem_pool or durable dataset zpool back to a specific dataset in blueprint_datasets, but it's uncomfortably implicit. We should replace filesystem_zpool with a non-optional filesystem_dataset: DatasetUuid and likewise replace the durable dataset zpool references with DatasetUuids, allowing us to be explicit and not need to map between types by building lookup tables.

This should also enable cleaner checks in blippy (once it exists; #6987). If we were writing blippy today, the most it could say is "for each zone, there is a dataset of the expected kind on the expected zpool". After performing this migration to explicit dataset IDs, it could more cleanly check "for each zone, the exact dataset they expect is present".

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with BlueprintZoneConfig in nexus/types/src/deployment.rs at the linked definition, then search for filesystem_zpool and durable dataset zpool references and the blueprint_datasets map. Trace the affected zone and blueprint types before replacing implicit zpool references with explicit DatasetUuid values; done means current target blueprints and their checks use the exact dataset IDs.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend, infrastructure
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.