feat: Implement non-destructive project suspension for compute instances - #200
Open
JoseSzycho wants to merge 3 commits into
Open
Conversation
7 tasks
scotwells
reviewed
Jul 29, 2026
…ropagate via WorkloadDeployment
Contributor
Author
|
Up! Anyone for reviewing this one? :) |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR introduces the compute-side API signaling and state management for project suspension.
Note: The actual process-halting mechanism is handled by the
unikraft-provider(which watches these state changes to delete the backing Pod).This PR ensures that when a project is suspended, the compute control-plane updates the Instance API to explicitly signal the provider to stop execution. It bypasses standard provisioning and marks the instances as unavailable, but crucially retains their placements, disks, and quota allocations for a seamless resume.
Key Changes
Suspendedboolean toInstanceSpecto act as the signal for the downstream provider, plus corresponding status reason constants (InstanceReadyReasonSuspended,InstanceAvailableReasonSuspended).suspend_hooks.go): ImplementedComputeSuspendandComputeResumehooks (implementing theservice-catalogconsumer interfaces) to idempotently toggle theSuspendedflag across all instances in a project.instance_controller.go): AddedreconcileSuspendedStateto theInstanceReconciler. WhenSpec.Suspendedis true, it halts normal provisioning, setsReadyandAvailableconditions toFalse, and syncs this paused state back to the federation hub.cmd/main.go): Registered the new hooks into theconsumerprovider.Options.TestConformanceSuspendResume) to ensure the transitions behave correctly and preserve instance identity.Main enhancement:
Issue: