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

feat: Live migration #29

Merged
merged 1 commit into from
Aug 26, 2022
Merged

Conversation

scuzhanglei
Copy link
Contributor

No description provided.

@codecov-commenter
Copy link

codecov-commenter commented Aug 19, 2022

Codecov Report

Merging #29 (ffcc138) into main (6a9aeed) will decrease coverage by 4.58%.
The diff coverage is 18.04%.

@@            Coverage Diff             @@
##             main      #29      +/-   ##
==========================================
- Coverage   35.72%   31.13%   -4.59%     
==========================================
  Files           3        5       +2     
  Lines         949     1275     +326     
==========================================
+ Hits          339      397      +58     
- Misses        560      818     +258     
- Partials       50       60      +10     
Impacted Files Coverage Δ
pkg/controller/vmm_controller.go 0.00% <0.00%> (ø)
pkg/controller/vm_controller.go 21.50% <20.00%> (-0.81%) ⬇️
pkg/controller/vmm_webhook.go 37.31% <37.31%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@scuzhanglei scuzhanglei marked this pull request as draft August 19, 2022 15:38
@scuzhanglei scuzhanglei force-pushed the live-migration branch 3 times, most recently from ffcc138 to 60822eb Compare August 25, 2022 04:53
@scuzhanglei scuzhanglei marked this pull request as ready for review August 25, 2022 04:54
cmd/virt-prerunner/main.go Outdated Show resolved Hide resolved
pkg/apis/virt/v1alpha1/types.go Outdated Show resolved Hide resolved
pkg/controller/vm_controller.go Show resolved Hide resolved
pkg/controller/vm_controller.go Outdated Show resolved Hide resolved
pkg/controller/vm_controller.go Outdated Show resolved Hide resolved
pkg/controller/vmm_controller.go Show resolved Hide resolved
pkg/daemon/vm_controller.go Show resolved Hide resolved
}
case virtv1alpha1.VirtualMachineMigrationSent:
if vm.Status.Migration.TargetNodeName == r.NodeName {
// TODO handle VmNotCreated error
Copy link
Contributor

Choose a reason for hiding this comment

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

Solve this TODO?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we don't know the VM is creating or it will never be created(maybe something wrong). raise the error might be a better choice now.

and now we just raise an error during VM is migrating instead of return a ctrl.Result with requeue. maybe we need another PR to fix all these questions.

Copy link
Contributor

Choose a reason for hiding this comment

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

We can capture certain type of errors in the main reconcile func and convert it to a requeue. But yeah, it can be another commit

pkg/daemon/vm_controller.go Outdated Show resolved Hide resolved
pkg/daemon/vm_controller.go Outdated Show resolved Hide resolved
@scuzhanglei scuzhanglei force-pushed the live-migration branch 2 times, most recently from 37875ee to 93e4c72 Compare August 26, 2022 05:46
cmd/virt-prerunner/main.go Outdated Show resolved Hide resolved
Recorder record.EventRecorder
}

// +kubebuilder:rbac:groups=virt.virtink.smartx.com,resources=virtualmachinemigrations,verbs=get;list;watch
Copy link
Contributor

Choose a reason for hiding this comment

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

Full CRUD?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the controller doesn't need create/update/delete VMM. keep the permissions less.

pkg/daemon/vm_controller.go Outdated Show resolved Hide resolved
Copy link
Contributor

@fengye87 fengye87 left a comment

Choose a reason for hiding this comment

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

LGTM

@fengye87 fengye87 merged commit 4b5e4d2 into smartxworks:main Aug 26, 2022
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.

None yet

3 participants