Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

api: clean up Instance and InstanceProperties types #803

Merged
merged 4 commits into from
Oct 30, 2024

Conversation

gjcolombo
Copy link
Contributor

Clean up unused fields and structures in the server API:

  • Remove the unused image_id and bootrom_id fields from InstanceProperties.
  • Remove the disks and nics fields from the Instance struct returned by an instance GET and all their supporting types. These are also not used today. Callers who are interested in finding out about an instance's disks and NICs can query the instance spec GET endpoint instead.
  • Remove the CPU count and memory size fields from InstanceProperties and put them in InstanceEnsureRequest instead. This eliminates an extra copy of these data in the server (they were available in both the properties and the instance spec; now they're just available in the spec).

N.B. This is a client API breaking change; requiescat, migrate-from-base tests. The live migration protocol is unaffected.

Tests: cargo test; PHD; deployed this change to an Omicron dev cluster and booted some instances there; launched and migrated a VM between local servers using propolis-cli.

Fixes #723.

@gjcolombo gjcolombo added the api Related to the API. label Oct 29, 2024
@gjcolombo gjcolombo requested a review from hawkw October 29, 2024 23:16
Copy link
Member

@hawkw hawkw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You love to see it!

@gjcolombo gjcolombo merged commit 86101ea into master Oct 30, 2024
10 of 11 checks passed
@gjcolombo gjcolombo deleted the gjcolombo/instance-types-cleanup branch October 30, 2024 20:06
gjcolombo added a commit to oxidecomputer/omicron that referenced this pull request Oct 31, 2024
Pick up Propolis commit 86101eaf80b55e7f405b5cafe9b0de0e9f331656, which
contains oxidecomputer/propolis#803 (and nothing else, since we just
picked up its parent commit!).

Tests: cargo nextest; booted a few VMs in a dev cluster.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Related to the API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make use of or remove unused fields in InstanceProperties and Instance types
2 participants