kvm: let libvirt remove RBD snapshots on volume delete - #13763
Conversation
LibvirtStorageAdaptor#deletePhysicalDisk manually connected to Ceph via librados/librbd to unprotect and remove every snapshot of an RBD image before asking libvirt to delete the volume. libvirt's RBD storage backend has supported VIR_STORAGE_VOL_DELETE_WITH_SNAPSHOTS since 1.2.20, which does the same unprotect/remove internally. Pass that flag instead and drop the manual cleanup.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #13763 +/- ##
=========================================
Coverage 19.65% 19.65%
+ Complexity 19792 19789 -3
=========================================
Files 6368 6368
Lines 574881 574843 -38
Branches 70351 70349 -2
=========================================
- Hits 112970 112963 -7
+ Misses 449639 449607 -32
- Partials 12272 12273 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
nice ! |
Tnx! Fun is that I implemented this in Libvirt over 10y ago and totally forgot to fix it in CloudStack. Simple change to reduce the amount of code, better to have Libvirt do this. |
yeah. I have waited 4 years for the fix for #6180 😆 |
Here is the first one! Have a look at the code and review it. |
|
@blueorangutan package kvm |
|
@andrijapanicsb a [SL] Jenkins job has been kicked to build packages. It will be bundled with kvm SystemVM template(s). I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✖️ debian ✔️ suse15. SL-JID 18734 |
Description
LibvirtStorageAdaptor#deletePhysicalDisk manually connected to Ceph via librados/librbd to unprotect and remove every snapshot of an RBD image before asking libvirt to delete the volume. libvirt's RBD storage backend has supported VIR_STORAGE_VOL_DELETE_WITH_SNAPSHOTS since 1.2.20, which does the same unprotect/remove internally. Pass that flag instead and drop the manual cleanup.
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale