-
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 up PVCs when canceling populator flows #590
Conversation
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.
we can move our offline discussion about specific handling for canceled migrations here - why do we need special handling, isn't it a concrete case of a migration that completes (unsuccessfully) before posting a vm?
yup. it means the vm doesn't exist, there is no owner to the PVCs. it will break a restart tryout and if you just cancel because you don't wish to continue you will have leftovers. |
ok, but how is it different from a migration that fails during disk transfer?
what's the reason that 'restart' would fail in this case and work for a migration that failed during disk transfer?
I don't see this as a problem - it's ok to have "leftovers" as long as the migration exists, it's important to remove everything when the plan is removed |
it doesn't.
i need to check it. but if we have the PVC and try to recreate them i think we will fail. migration that failed can have the same problem.
you suggest having it on every cleanup flow? e.g based on the PVC has ownership? |
yeah, assuming that by "cleanup flow" you refer to what we do before restarting a plan or during archive operation |
dd54aa5
to
3597547
Compare
Done. |
3597547
to
a0ed5e5
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 changes look good, minor comments inside
about restarting the populator pod on failure - yeah, it makes sense to align the populator pods with importer pods, but that's a separate task
a0ed5e5
to
cbb441b
Compare
cbb441b
to
1063019
Compare
This patch will clean up the PVCs (final and prime) associated with VMs that the migration was cancled for them. Signed-off-by: Liran Rotenberg <[email protected]>
1063019
to
12d417b
Compare
c5884f9
to
4d9fc2a
Compare
To return an error when we can't get a prime PVC rather than continue to the next PVC. Also refactored the code a bit to reduce cognitive complexity. Signed-off-by: Arik Hadas <[email protected]>
4d9fc2a
to
ef67399
Compare
Signed-off-by: Arik Hadas <[email protected]>
Renamed it to DeletePopulatedPVCs and extract the sections that remove the corresponding prime PVC and the patched PVC to separate functions. Also rename Migration#cleanUpPopulatorPVCs to delete PopulatorPVCs. Signed-off-by: Arik Hadas <[email protected]>
9571e3d
to
26993cb
Compare
Signed-off-by: Arik Hadas <[email protected]>
663db1e
to
6e3e8a7
Compare
This script can be used to clean up vendored code from security issues, here we remove two unused Dockerfiles that have some security issues. Signed-off-by: Arik Hadas <[email protected]>
d268912
to
b3e2119
Compare
Signed-off-by: Arik Hadas <[email protected]>
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
This patch will clean up the PVCs (final and prime) associated with VMs that the migration was cancled for them.