-
Notifications
You must be signed in to change notification settings - Fork 38
neonvm-controller: set MigrationName on a VM #1300
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
base: main
Are you sure you want to change the base?
Conversation
No changes to the coverage.
HTML Report |
Signed-off-by: Oleg Vasilev <[email protected]>
This allows us to resolve conflicts between different migrations trying to work with the same VM. Signed-off-by: Oleg Vasilev <[email protected]>
Not a functional change, makes code simpler. Signed-off-by: Oleg Vasilev <[email protected]>
8b31e33 to
8479225
Compare
sharnoff
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple questions
| } | ||
| return &vm, nil | ||
| // return err and try reconcile again | ||
| return ctrl.Result{}, err |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question(blocking): Given that if err != nil always ends in returning here, does that mean that we never remove the finalizer, and so the migration object cannot be deleted if the VM doesn't exist?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's true, and this problem existed before this PR. Let me think about a solution.
| return r.updateMigrationStatus(ctx, migration) | ||
| if vm.Status.MigrationName == "" { | ||
| if vm.Status.Phase != vmv1.VmRunning { | ||
| // VM must be scaling, so we will try again in a second |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question:
VM must be scaling
Why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's an evolution of the // some other VM status (Scaling may be), requeue after second
But I agree, "may be" should not have turned into must be.
This allows us to: