| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Codecov Report❌ Patch coverage is 79.31034% with 6 lines in your changes missing coverage. Please review.
@@ Coverage Diff @@
## 4.22 #12813 +/- ##
============================================
+ Coverage 17.61% 17.68% +0.07%
- Complexity 15662 15795 +133
============================================
Files 5917 5922 +5
Lines 531415 533149 +1734
Branches 64973 65208 +235
============================================
+ Hits 93588 94283 +695
- Misses 427271 428214 +943
- Partials 10556 10652 +96
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness.
|
Sorry, something went wrong.
There was a problem hiding this comment.
clgtm, but a concern remains (might be mute): Are we sure, when marking the snapshots records, there are really no data files left on primary for those?
I do not see any code ensuring that.
Sorry, something went wrong.
There was a problem hiding this comment.
lgtm
Sorry, something went wrong.
There was a problem hiding this comment.
This PR addresses orphaned primary-only snapshot database records during volume expunge, especially for KVM + Ceph/RBD when snapshots are not backed up to secondary storage.
Changes:
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| server/src/main/java/com/cloud/storage/StorageManagerImpl.java | Adds primary-only snapshot record cleanup during storage garbage collection. |
| server/src/test/java/com/cloud/storage/StorageManagerImplTest.java | Adds unit tests covering the new cleanup helper behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Sorry, something went wrong.
| snapshot.setState(Snapshot.State.Destroyed); | ||
| _snapshotDao.update(snapshot.getId(), snapshot); |
Good catch @DaanHoogland fixed. Cleanup now routes through _snapshotService.deleteSnapshot(...) so the storage driver actually removes the data, and the parent snapshots row only flips to Destroyed after confirming no live store refs remain. |
Sorry, something went wrong.
…nd improve error handling
… limits, and removing annotations
|
@Damans227 a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
Sorry, something went wrong.
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 17917 |
Sorry, something went wrong.
|
@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
Sorry, something went wrong.
|
[SF] Trillian Build Failed (tid-16129) |
Sorry, something went wrong.
|
@vladimirpetrov a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
Sorry, something went wrong.
|
[SF] Trillian test result (tid-16783)
|
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Description
When snapshot.backup.to.secondary=false (KVM + Ceph) and a VM is expunged, Ceph destroys the RBD snapshots along with the volume image, but the DB records (snapshots, snapshot_store_ref) are left behind as undeletable orphans.
Fix
In StorageManagerImpl.cleanupStorage(), clean up primary-only snapshot records before the volume is expunged from storage.
Fixes: #12002
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
Tested on KVM + Ceph (RBD) with snapshot.backup.to.secondary=false:
How did you try to break this feature and the system with this change?
Tested with snapshots having both primary and secondary refs, and with already-destroyed snapshots, both worked correctly skipped.