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
Handle Ceph/RBD snapshot delete #3615
Conversation
@GabrielBrascher I don't have ceph env to run test against, can you describe testing you've done cc @andrijapanicsb |
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
Packaging result: ✖centos6 ✔centos7 ✔debian. JID-303 |
@blueorangutan test |
@rhtyd a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
@rhtyd I tested the deletion of a ROOT volume snapshot via UI. Prior to this implementation, the snapshot DB entry was removed; however, the snapshot kept on the RBD. This happened due to the fact that the This fix allows the Ceph strategy (wich extends the StorageSystemSnapshotStrategy) to return StrategyPriority.HIGH for deleting snapshots stored on RBD. Therefore, the deleteSnapshot method of In order to verify, one can delete the snapshot. Assert that it was indeed removed on DB and check if the RBD snapshot was deleted on Ceph (
All the snapshots above were removed on DB but not on the Ceph. After applying the fix, I was able to delete snapshots propperly. |
I'll be testing this one @rhtyd @GabrielBrascher . thx for the fix. |
Tested with snapshot.backup.to.secondary=true - since this is also a needed test. Snaps ARE deleted on Ceph (manual, still waiting for scheduled test result...) Picture=1000 words/etc. - please see bellow - multiple garbage collection runs and 0 snaps found for cleanup on SS This was working always fine (not sure when it got broken...) |
Thanks for testing @andrijapanicsb. Good that RBD looks fine. That secondary storage snapshot deletion was also broken then, good catch; not sure when it got broken as well neither where but I have somthing in mind that might be causing this issue. I will be reproducing and debugging it on my test env. |
sure - thx @GabrielBrascher. FTR, scheduled snaps are also not removed from SS, but are removed from fine from RBD |
Let's do a regression test |
@rhtyd a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
Trillian test result (tid-402)
|
@rhtyd @GabrielBrascher this seems to be an issue with any storage and any? hypervisor (KVM and XS tested) even on 4.11(.2) releases. Make snap (XS plus NFS), delete snap - snap is left on Primary Storage AND on Secondary Storage. Can you guys give this a bit more attention, so it's properly fixed for any kind of Primary Storage? /CC @PaulAngus |
@andrijapanicsb thanks for the feedback. It is a bigger issue than we thought. It looks that the XenserverSnapshotStrategy is aiming to handle multiple cases, not only XenServer (e.g. there is also a check considering RBD cases for that strategy). One approach might be simplifying the different cases by separating the cases (RBD / Xen primary). |
@GabrielBrascher yes, you are right, that XenserverSnapshotStrategy is indeed handling also KVM stuff. Listen, let me open a new issue for this if that is OK for you - I want that new one to be a blocker - i.e. people using 4.11.x and 4.13 will now have tons of garbage on their primary and secondary storage. |
@GabrielBrascher I've opened a new, general issue, #3646 but you feel free to check it out and perhaps work only Ceph here in this PR - up to you - just let's make sure everything is fixed - I'm happy to help with testing. |
Is this ready for merging given what it says on the tin @andrijapanicsb @GabrielBrascher ? |
This one, as tested back then, looks good. |
When deleting volume snapshots, only records in the database are deleted, and snapshots are not deleted on the main storage. Fixes: apache#3586
Description
When deleting volume snapshots, only records in the database are deleted, and snapshots are not deleted on the main storage.
Fixes: #3586
Types of changes
How Has This Been Tested?
Configuration:
I was able to reproduce the issue #3586. After applying the packages with this fix, snapshots were properly removed from DB and deleted from the RBD storage pool.