Skip to content

feat: cross-node migration API surface (restore annotation, spec.nodeName, Migrating phase)#3

Open
tonicmuroq wants to merge 3 commits into
mainfrom
feat/restore-from-hibernate-annotation
Open

feat: cross-node migration API surface (restore annotation, spec.nodeName, Migrating phase)#3
tonicmuroq wants to merge 3 commits into
mainfrom
feat/restore-from-hibernate-annotation

Conversation

@tonicmuroq

Copy link
Copy Markdown
Contributor

Shared API surface for cross-node VM migration (client.migrate(vmname, node)). This is the contract the operator and vk-cocoon build on, so merge this firstvk-cocoon and cocoon-operator pin commits from this branch via go.mod pseudo-versions and will bump to the release tag once this lands.

Commits

  • restore-from-hibernate annotation key + ReadRestoreFromHibernate reader — operator→vk signal that a freshly created pod restores its VM from the :hibernate snapshot instead of cloning from the base image.
  • CocoonSetSpec.NodeName + regenerated CRD — pins a VM to a node; empty leaves scheduler placement alone, a value becomes a hostname nodeAffinity (operator side).
  • CocoonSetPhaseMigrating enum — status phase the operator surfaces during a migration so the control plane can poll.

Notes

  • deepcopy unchanged (value field); CRD regenerated via make manifests.
  • make lint clean on GOOS=linux and GOOS=darwin.

Part of cross-node migrate (cocoon side). Companion PRs: vk-cocoon (restore path), cocoon-operator (affinity + migration state machine).

Operator->vk-cocoon signal: a freshly created pod flagged with
vm.cocoonstack.io/restore-from-hibernate restores its VM from the
:hibernate snapshot (cross-node migration) instead of cloning from
the base image. Adds the key plus a ReadRestoreFromHibernate reader.
Empty leaves scheduler placement within NodePool untouched; a value is
translated operator-side into a hostname nodeAffinity (Pending if it won't
fit) rather than a hard NodeName bind. Regenerates the CocoonSet CRD.
Status phase the operator sets during a cross-node migration so the control
plane can poll progress; back to Running when the VM is settled on the target.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant