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

Nexus should treat Propolises (not just instances) as sled services #2839

Closed
gjcolombo opened this issue Apr 14, 2023 · 0 comments · Fixed by #2840
Closed

Nexus should treat Propolises (not just instances) as sled services #2839

gjcolombo opened this issue Apr 14, 2023 · 0 comments · Fixed by #2840
Assignees
Labels
nexus Related to nexus
Milestone

Comments

@gjcolombo
Copy link
Contributor

Nexus uses instance IDs as the "service ID" primary key when accounting for an instance's resource consumption on a sled. This doesn't work well for live migration, where an instance can live on multiple sleds at once, or (in the extremely hypothetical case of an intra-sled migration) can have multiple independent Propolises on the same sled.

Fortunately, the actual service that consumes resources to provide a virtual machine--a Propolis process--has its own ID, so we can use that as the resource key instead.

@gjcolombo gjcolombo added the nexus Related to nexus label Apr 14, 2023
@gjcolombo gjcolombo self-assigned this Apr 14, 2023
@gjcolombo gjcolombo added this to the MVP milestone Apr 14, 2023
gjcolombo added a commit that referenced this issue Apr 14, 2023
Using instance IDs to reserve VMM resources on sleds is not quite
flexible enough, because a single instance can have multiple Propolis
VMMs. Use the Propolis ID as the key for these instead.

Add a function to allow the deletion saga to fetch a previously-deleted
instance record so that it can obtain this ID at the correct time.
Simply returning the deleted record from the delete-record step is
insufficient because the record- deleting step needs to be idempotent
and, if it runs more than once, may not find any record to delete and
return.

Tested: cargo test. Will also do some ad hoc VM creations/deletions on a
test cluster before merging.

Fixes #2839.

---------

Co-authored-by: Sean Klein <sean@oxide.computer>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
nexus Related to nexus
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant