-
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: one ensure API to rule them all (#813)
Remove the existing instance ensure APIs and collapse them into a single API that takes a set of instance properties and a mechanism for creating the instance, which can be either creating a new VM from a spec or initializing as a live migration target. In the latter case, the client can also supply a list of instance spec components that the client wishes to override the components in the source's spec. This gives Omicron a way to replace backend information (Crucible generation number, host VNIC names) that changes over live migration. Remove all of the instance ensure types that supported the old ensure interface. One notable consequence of this is that the `DiskRequest` type also caused propolis-server's versions of Crucible's `VolumeConstructionRequest` and `CrucibleOpts` types to appear in the generated client. Omicron code tends to pull these types in from propolis-client (often transitively through sled-agent-client). This is a useful way of making sure Omicron components serialize/deserialize VCRs the same way Propolis does, so preserve it by re-exporting these types from propolis-client. Remove the parts of the mock server that validated disk, NIC, and cloud-init volume requests. The Omicron tests that use the mock server primarily check that its serial console interface works as expected and don't heavily exercise these checks. (Omicron CI's end-to-end test will fail if sled-agent mishandles the Propolis ensure API.) Finally, remove a few other unused types from the propolis_api_types crate. Tests: cargo test, PHD, driving ad hoc VMs with propolis-cli.
- Loading branch information
Showing
23 changed files
with
601 additions
and
1,356 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 was deleted.
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
Oops, something went wrong.