-
Notifications
You must be signed in to change notification settings - Fork 34
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
Clean importer pods on success #588
Conversation
9294d8f
to
fb69998
Compare
fb69998
to
182fab8
Compare
pkg/controller/plan/migration.go
Outdated
@@ -748,14 +748,15 @@ func (r *Migration) execute(vm *plan.VMStatus) (err error) { | |||
// Removing unnecessary DataVolumes | |||
err = r.kubevirt.DeleteDataVolumes(vm) | |||
if err != nil { | |||
step.AddError(err.Error()) |
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.
how about separating out the changes here and below to a different PR? I don't understand why skipping the call to step.AddError and the changes below also don't make much sense (setting error in line 751 and then proceeding to 753 that could override it)
@liranr23 I also rephrased the description of the PR, please change the commit message as well |
fa9ca40
to
6b6d0ec
Compare
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.
the comments inside are rather minor but this PR includes two changes:
- remove multiple importer pods by a PVC
- remove importer pods when posting the vm so that the PV and PVC would be removed when removing the VM
only the first part is documented in the commit message
I'd prefer to separate this PR to two different PRs for each of them but it's also ok to extend the commit message to cover both..
20deb30
to
6774f8b
Compare
@liranr23 the changes look good |
Multiple importer pods may be created during warm migrations. This patch cleans up all of them for the migrated VM once the migration completes successfully. This becomes handy once a user wishes to delete a migrated VM including its disks. In such case, there would be no importer pods that prevent the PVC and PV from being removed. Signed-off-by: Liran Rotenberg <[email protected]>
6774f8b
to
11fea44
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Multiple importer pods may be created during warm migrations. This patch
cleans up all of them for the migrated VM once the migration completes
successfully.
This becomes handy once a user wishes to delete a migrated VM including
its disks. In such case, there would be no importer pods that prevent the
PVC and PV from being removed.