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

Move virtual provisioning accounting for instances to instance start saga #4257

Closed
gjcolombo opened this issue Oct 11, 2023 · 0 comments · Fixed by #4277
Closed

Move virtual provisioning accounting for instances to instance start saga #4257

gjcolombo opened this issue Oct 11, 2023 · 0 comments · Fixed by #4277
Assignees
Labels
nexus Related to nexus

Comments

@gjcolombo
Copy link
Contributor

This is a follow-up to #4194. Once that lands, instances should only count as 'provisioned' if they're actually running. To do this, we need to:

  • move the virtual provisioning steps in the create saga to the start saga
  • change the way instance virtual provisioning counters are keyed (today we use instance ID; now we'll need to use Propolis IDs; this is the virtual-provisioning equivalent of Nexus should treat Propolises (not just instances) as sled services #2839)
  • make sure these charges get cleaned up when instances are stopped (same place as we clean up sled resource reservations)

See the discussion in RFD 427 for more context.

@gjcolombo gjcolombo added the nexus Related to nexus label Oct 11, 2023
@gjcolombo gjcolombo self-assigned this Oct 11, 2023
gjcolombo added a commit that referenced this issue Oct 20, 2023
Only charge virtual provisioning collections for instances when those
instances are running. Charges are taken in the instance start saga and
dropped when a sled agent tries to transition an instance to a stopped
state. Unlike sled resource charges, provisioning charges are tied to
instance states, not to VMM lifetimes. This ensures that a user is not
charged twice for an instance (e.g. for quota management purposes) while
the instance is migrating. See RFD 427 for more discussion.

Also fix a small idempotency issue in the cleanup path for VMM
resources.

Tests: updated integration tests; manually checked virtual provisioning
table values in a dev cluster & checked the values on the utilization
graphs.

Fixes #4257.
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