René's URL Explorer Experiment


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

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:31c178ca-913b-79b6-e950-1a4253590ebb
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idB116:DFFE4:146D210:1D2B755:6A4CC738
html-safe-nonce6785bc27dfeb5a0af03f0b5c2a394efc27d0ea2a2aaf3e2fc0c370e5ba60f042
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMTE2OkRGRkU0OjE0NkQyMTA6MUQyQjc1NTo2QTRDQzczOCIsInZpc2l0b3JfaWQiOiI4MjQ1MTQxMDE0NDY2ODQwMzc2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacb502eb73a4694c803d74594fbf7c9e8fdefbd89b723ffb6e64b215c146a5aff6
hovercard-subject-tagpull_request:3396611868
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/apache/cloudstack/pull/12813/files
twitter:imagehttps://avatars.githubusercontent.com/u/61474540?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/61474540?s=400&v=4
og:image:altDescription 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_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None3d11bb817438277de2a940854450e83a7d32b6aeb5014e9e6b00a6423900251c
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/apache/cloudstack git https://github.com/apache/cloudstack.git
octolytics-dimension-user_id47359
octolytics-dimension-user_loginapache
octolytics-dimension-repository_id9759448
octolytics-dimension-repository_nwoapache/cloudstack
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id9759448
octolytics-dimension-repository_network_root_nwoapache/cloudstack
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
released0da0eb92994395299ed4450bf67b0373005be36
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/apache/cloudstack/pull/12813/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fapache%2Fcloudstack%2Fpull%2F12813%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fapache%2Fcloudstack%2Fpull%2F12813%2Ffiles
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=apache%2Fcloudstack
Reloadhttps://github.com/apache/cloudstack/pull/12813/files
Reloadhttps://github.com/apache/cloudstack/pull/12813/files
Reloadhttps://github.com/apache/cloudstack/pull/12813/files
Please reload this pagehttps://github.com/apache/cloudstack/pull/12813/files
apache https://github.com/apache
cloudstackhttps://github.com/apache/cloudstack
Notifications https://github.com/login?return_to=%2Fapache%2Fcloudstack
Fork 1.3k https://github.com/login?return_to=%2Fapache%2Fcloudstack
Star 3k https://github.com/login?return_to=%2Fapache%2Fcloudstack
Code https://github.com/apache/cloudstack
Issues 534 https://github.com/apache/cloudstack/issues
Pull requests 265 https://github.com/apache/cloudstack/pulls
Discussions https://github.com/apache/cloudstack/discussions
Actions https://github.com/apache/cloudstack/actions
Projects https://github.com/apache/cloudstack/projects
Wiki https://github.com/apache/cloudstack/wiki
Security and quality 0 https://github.com/apache/cloudstack/security
Insights https://github.com/apache/cloudstack/pulse
Code https://github.com/apache/cloudstack
Issues https://github.com/apache/cloudstack/issues
Pull requests https://github.com/apache/cloudstack/pulls
Discussions https://github.com/apache/cloudstack/discussions
Actions https://github.com/apache/cloudstack/actions
Projects https://github.com/apache/cloudstack/projects
Wiki https://github.com/apache/cloudstack/wiki
Security and quality https://github.com/apache/cloudstack/security
Insights https://github.com/apache/cloudstack/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fapache%2Fcloudstack%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fapache%2Fcloudstack%2Fissues%2Fnew%2Fchoose
Damans227https://github.com/Damans227
apache:4.22https://github.com/apache/cloudstack/tree/4.22
Damans227:fix/12002-cleanup-orphaned-ceph-snapshotshttps://github.com/Damans227/cloudstack/tree/fix/12002-cleanup-orphaned-ceph-snapshots
Conversation 14 https://github.com/apache/cloudstack/pull/12813
Commits 6 https://github.com/apache/cloudstack/pull/12813/commits
Checks 26 https://github.com/apache/cloudstack/pull/12813/checks
Files changed https://github.com/apache/cloudstack/pull/12813/files
Please reload this pagehttps://github.com/apache/cloudstack/pull/12813/files
Clean up primary-only snapshot DB records on volume expunge https://github.com/apache/cloudstack/pull/12813/files#top
Show all changes 6 commits https://github.com/apache/cloudstack/pull/12813/files
e580af8 Clean up primary-only snapshot DB records during volume deletion to p… Damans227 Mar 13, 2026 https://github.com/apache/cloudstack/pull/12813/commits/e580af8875ea45016725d37331e09d6ffcb328bc
77515d1 Clean up primary-only snapshot in StorageManagerImpl scavenger instead Damans227 Mar 13, 2026 https://github.com/apache/cloudstack/pull/12813/commits/77515d1fa4c5acd5fe46b20357db211923958ba8
3935803 cleanup Damans227 Mar 13, 2026 https://github.com/apache/cloudstack/pull/12813/commits/393580349f645da8e6f2869e88b2599f01836906
79c00ba cleanup Damans227 Mar 13, 2026 https://github.com/apache/cloudstack/pull/12813/commits/79c00ba75bf002665abef1b96d3b38a8dedb4aba
66f1e64 Refactor snapshot cleanup logic to use SnapshotService for deletion a… Damans227 May 20, 2026 https://github.com/apache/cloudstack/pull/12813/commits/66f1e644881275e3fbd581b616e3cd555836e0d6
28548b2 Enhance snapshot cleanup process by updating state, managing resource… Damans227 May 20, 2026 https://github.com/apache/cloudstack/pull/12813/commits/28548b2c4f92ee40dc9319df31bcd48a2279917d
Clear filters https://github.com/apache/cloudstack/pull/12813/files
Please reload this pagehttps://github.com/apache/cloudstack/pull/12813/files
Please reload this pagehttps://github.com/apache/cloudstack/pull/12813/files
StorageManagerImpl.java https://github.com/apache/cloudstack/pull/12813/files#diff-cf68e132ad7711cfa9250cda5819c09f51cba9933aa595cd82ad5a02b4edbe64
StorageManagerImplTest.java https://github.com/apache/cloudstack/pull/12813/files#diff-3ed6779e277830ef22f230044521c9dac19b284e9f24992c24ecdf24c3071535
server/src/main/java/com/cloud/storage/StorageManagerImpl.javahttps://github.com/apache/cloudstack/pull/12813/files#diff-cf68e132ad7711cfa9250cda5819c09f51cba9933aa595cd82ad5a02b4edbe64
View file https://github.com/apache/cloudstack/blob/28548b2c4f92ee40dc9319df31bcd48a2279917d/server/src/main/java/com/cloud/storage/StorageManagerImpl.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/apache/cloudstack/pull/12813/{{ revealButtonHref }}
https://github.com/apache/cloudstack/pull/12813/files#diff-cf68e132ad7711cfa9250cda5819c09f51cba9933aa595cd82ad5a02b4edbe64
Please reload this pagehttps://github.com/apache/cloudstack/pull/12813/files
https://github.com/apache/cloudstack/pull/12813/files#diff-cf68e132ad7711cfa9250cda5819c09f51cba9933aa595cd82ad5a02b4edbe64
https://github.com/apache/cloudstack/pull/12813/files#diff-cf68e132ad7711cfa9250cda5819c09f51cba9933aa595cd82ad5a02b4edbe64
https://github.com/apache/cloudstack/pull/12813/files#diff-cf68e132ad7711cfa9250cda5819c09f51cba9933aa595cd82ad5a02b4edbe64
server/src/test/java/com/cloud/storage/StorageManagerImplTest.javahttps://github.com/apache/cloudstack/pull/12813/files#diff-3ed6779e277830ef22f230044521c9dac19b284e9f24992c24ecdf24c3071535
View file https://github.com/apache/cloudstack/blob/28548b2c4f92ee40dc9319df31bcd48a2279917d/server/src/test/java/com/cloud/storage/StorageManagerImplTest.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/apache/cloudstack/pull/12813/{{ revealButtonHref }}
https://github.com/apache/cloudstack/pull/12813/files#diff-3ed6779e277830ef22f230044521c9dac19b284e9f24992c24ecdf24c3071535
https://github.com/apache/cloudstack/pull/12813/files#diff-3ed6779e277830ef22f230044521c9dac19b284e9f24992c24ecdf24c3071535
https://github.com/apache/cloudstack/pull/12813/files#diff-3ed6779e277830ef22f230044521c9dac19b284e9f24992c24ecdf24c3071535
https://github.com/apache/cloudstack/pull/12813/files#diff-3ed6779e277830ef22f230044521c9dac19b284e9f24992c24ecdf24c3071535
https://github.com/apache/cloudstack/pull/12813/files#diff-3ed6779e277830ef22f230044521c9dac19b284e9f24992c24ecdf24c3071535
https://github.com/apache/cloudstack/pull/12813/files#diff-3ed6779e277830ef22f230044521c9dac19b284e9f24992c24ecdf24c3071535
https://github.com/apache/cloudstack/pull/12813/files#diff-3ed6779e277830ef22f230044521c9dac19b284e9f24992c24ecdf24c3071535
https://github.com/apache/cloudstack/pull/12813/files#diff-3ed6779e277830ef22f230044521c9dac19b284e9f24992c24ecdf24c3071535
https://github.com/apache/cloudstack/pull/12813/files#diff-3ed6779e277830ef22f230044521c9dac19b284e9f24992c24ecdf24c3071535
Please reload this pagehttps://github.com/apache/cloudstack/pull/12813/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.