Title: Clean up primary-only snapshot DB records on volume expunge by Damans227 · Pull Request #12813 · apache/cloudstack · GitHub
Open Graph Title: Clean up primary-only snapshot DB records on volume expunge by Damans227 · Pull Request #12813 · apache/cloudstack
X Title: Clean up primary-only snapshot DB records on volume expunge by Damans227 · Pull Request #12813 · apache/cloudstack
Description: 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 Breaking change (fix or feature that would cause existing functionality to change) New feature (non-breaking change which adds functionality) Bug fix (non-breaking change which fixes an issue) Enhancement (improves an existing feature and functionality) Cleanup (Code refactoring and cleanup, that may add test cases) Build/CI Test (unit or integration test code) Feature/Enhancement Scale or Bug Severity Feature/Enhancement Scale Major Minor Bug Severity BLOCKER Critical Major Minor Trivial Screenshots (if appropriate): How Has This Been Tested? Tested on KVM + Ceph (RBD) with snapshot.backup.to.secondary=false: Deployed VM on Ceph, took volume snapshot, destroyed+expunged VM Verified snapshot DB records cleaned up after storage scavenger cycle Confirmed NFS snapshots (with secondary copies) are unaffected Unit tests cover: primary-only cleanup, skip when secondary exists, skip destroyed snapshots 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.
Open Graph Description: 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...
X Description: 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...
Opengraph URL: https://github.com/apache/cloudstack/pull/12813
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:31c178ca-913b-79b6-e950-1a4253590ebb |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | B116:DFFE4:146D210:1D2B755:6A4CC738 |
| html-safe-nonce | 6785bc27dfeb5a0af03f0b5c2a394efc27d0ea2a2aaf3e2fc0c370e5ba60f042 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMTE2OkRGRkU0OjE0NkQyMTA6MUQyQjc1NTo2QTRDQzczOCIsInZpc2l0b3JfaWQiOiI4MjQ1MTQxMDE0NDY2ODQwMzc2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | b502eb73a4694c803d74594fbf7c9e8fdefbd89b723ffb6e64b215c146a5aff6 |
| hovercard-subject-tag | pull_request:3396611868 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/apache/cloudstack/pull/12813/files |
| twitter:image | https://avatars.githubusercontent.com/u/61474540?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/61474540?s=400&v=4 |
| og:image:alt | 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... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 3d11bb817438277de2a940854450e83a7d32b6aeb5014e9e6b00a6423900251c |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/apache/cloudstack git https://github.com/apache/cloudstack.git |
| octolytics-dimension-user_id | 47359 |
| octolytics-dimension-user_login | apache |
| octolytics-dimension-repository_id | 9759448 |
| octolytics-dimension-repository_nwo | apache/cloudstack |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 9759448 |
| octolytics-dimension-repository_network_root_nwo | apache/cloudstack |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | d0da0eb92994395299ed4450bf67b0373005be36 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width