-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
api: allow use of UUIDs as component IDs in instance specs (#816)
Change the map key type in instance specs from String to a SpecKey enum whose variants are Uuid and Name(String). This type serializes as a string (so it can be used as a JSON dictionary key) and will opportunistically deserialize into the Uuid variant. This allows the control plane to use UUIDs to identify VM objects wherever it makes sense while allowing it (and other users) to continue to use strings as component IDs (e.g. because no UUID is available or because the relevant UUID is being used by some other spec element). Index Propolis servers' VM objects using their SpecKeys. Note that the CrucibleBackendMap used to use UUIDs as keys, obtaining these from `Volume::get_uuid` after instantiating a Crucible upstairs. This UUID happens to be the control plane disk UUID (because of the way the control plane constructs its volume records); the intention is that Omicron will use disk IDs as its backend IDs so that its existing calls to Propolis's snapshot and volume-replace endpoints will Just Work. Change NVMe disk specifications to specify disk serial numbers explicitly instead of inferring them from a disk name or spec key. The intent is to use spec keys only to identify components and not to determine how they behave or how guests perceive them.
- Loading branch information
Showing
28 changed files
with
742 additions
and
413 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.