Skip to content

BlueprintZoneConfig: track dataset IDs explicitly #7214

@jgallagher

Description

@jgallagher

Today, BlueprintZoneConfig contains an optional filesystem_zpool:

/// zpool used for the zone's (transient) root filesystem
pub filesystem_pool: Option<ZpoolName>,

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".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions