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

neonvm: Small changes for stateless scheduler #1194

Merged
merged 3 commits into from
Jan 6, 2025

Conversation

sharnoff
Copy link
Member

@sharnoff sharnoff commented Jan 2, 2025

Extracted out of #1163, as suggested by #1163 (comment) and #1163 (comment).

These are mostly three unrelated commits among the broader theme of making stronger guarantees about what the Pods look like.

I'm intending to merge via rebase-and-merge to keep these commits separate.

Copy link

github-actions bot commented Jan 2, 2025

No changes to the coverage.

HTML Report

Click to open

Copy link
Contributor

@Omrigan Omrigan left a comment

Choose a reason for hiding this comment

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

LGTM

@sharnoff sharnoff force-pushed the sharnoff/neonvm-touchups-stateless-scheduler branch from a1b55f7 to 42f5c17 Compare January 6, 2025 16:54
sharnoff and others added 3 commits January 6, 2025 08:54
…1194)

From now on, during the migration we will have:

- Symmetrical owner refs: both VirtualMachine and
  VirtualMachineMigration will own both source and target pods.

- Asymmetrical controller refs: VirtualMachine controls source pod,
  VirtualMachineMigration controls target pod.

Once the migration is complete, neither the VirtualMachine nor the
VirtualMachineMigration will control the source pod, but they will still
have (non-controlling) owner refs.

This allows us to figure out the pod's role in the migration by
looking at it's references.

Co-authored-by: Oleg Vasilev <[email protected]>
We had some existing, similar helpers in 'pkg/util', but I figured it
makes more sense for those to be defined in 'neonvm/apis/...'.

This change originated while working on the stateless scheduler
prototype, where I found myself wanting a reliable way to determine what
role a pod has in a live migration from only the pod's metadata.
We weren't doing this previously, and it means that propagation of
labels/annotations can be arbitrarily delayed while the VM starts.
@sharnoff sharnoff force-pushed the sharnoff/neonvm-touchups-stateless-scheduler branch from 42f5c17 to 1a8473d Compare January 6, 2025 16:55
@sharnoff sharnoff enabled auto-merge (rebase) January 6, 2025 16:55
@sharnoff sharnoff merged commit 611b550 into main Jan 6, 2025
22 checks passed
@sharnoff sharnoff deleted the sharnoff/neonvm-touchups-stateless-scheduler branch January 6, 2025 17:11
sharnoff added a commit that referenced this pull request Jan 6, 2025
…1194)

From now on, during the migration we will have:

- Symmetrical owner refs: both VirtualMachine and
  VirtualMachineMigration will own both source and target pods.

- Asymmetrical controller refs: VirtualMachine controls source pod,
  VirtualMachineMigration controls target pod.

Once the migration is complete, neither the VirtualMachine nor the
VirtualMachineMigration will control the source pod, but they will still
have (non-controlling) owner refs.

This allows us to figure out the pod's role in the migration by
looking at it's references.

Co-authored-by: Oleg Vasilev <[email protected]>
sharnoff added a commit that referenced this pull request Jan 6, 2025
We had some existing, similar helpers in 'pkg/util', but I figured it
makes more sense for those to be defined in 'neonvm/apis/...'.

This change originated while working on the stateless scheduler
prototype, where I found myself wanting a reliable way to determine what
role a pod has in a live migration from only the pod's metadata.
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.

3 participants