René's URL Explorer Experiment


Title: fix(linstor): surface ambiguous template fallbacks and legacy orphan cleanup by jmsperu · Pull Request #13078 · apache/cloudstack · GitHub

Open Graph Title: fix(linstor): surface ambiguous template fallbacks and legacy orphan cleanup by jmsperu · Pull Request #13078 · apache/cloudstack

X Title: fix(linstor): surface ambiguous template fallbacks and legacy orphan cleanup by jmsperu · Pull Request #13078 · apache/cloudstack

Description: Summary Two small visibility improvements to the LINSTOR template-handling path. Both preserve existing behaviour and only add log output that surfaces conditions operators have currently no easy way to detect. 1. `LinstorUtil.findResourceDefinition` — log on ambiguous fallback When clone-from-template runs, the method scans for a resource whose name starts with the template prefix AND whose aux properties include `_cs-template-for-`. If no exact-property match exists, the method falls back to the first matching resource by name and returns it silently. In setups with multiple resource groups on the same controller (or with legacy templates cached before the ref-count convention was added), this fallback can return a template that belongs to the wrong resource group, and the clone produces an unexpected result. This change keeps the fallback behaviour but logs a WARN naming: the requested resource name and resource group the fallback resource that was chosen the actual `_cs-template-for-*` aux properties present on the fallback (so operators can see what RGs do claim it) 2. `LinstorStorageAdaptor.deRefOrDeleteResource` — log on legacy-template orphan cleanup The ref-count branch already deletes resources that have zero remaining `_cs-template-for-` aux properties. Two conditions reach this branch: a normal resource (no template-for properties expected) — already commented in code a legacy template with no template-for properties (predates the ref-count convention) Currently both look identical in the logs. Operators upgrading from older versions can't tell how many orphan legacy templates were cleaned up. This change logs an INFO line in the second case, identifying the resource as a legacy template and naming the resource group context. Behaviour unchanged. Test plan CI build + unit tests Manual: deploy a VM from template in a single-RG setup — no new logs Manual: deploy a VM from template in a multi-RG setup where the template lacks the exact aux property — observe the new WARN Manual: evict a legacy template (no aux properties) — observe the new INFO line during cleanup Why three small PRs Per the suggestion from earlier review, splitting LINSTOR plugin improvements into focused PRs: This PR (template hygiene) #13076 (delete-verification — addresses stuck DELETING accumulation) #13077 (live-migration pre-flight — catches not-a-LINSTOR-satellite up-front) All three target the LINSTOR primary-storage plugin and can be reviewed independently.

Open Graph Description: Summary Two small visibility improvements to the LINSTOR template-handling path. Both preserve existing behaviour and only add log output that surfaces conditions operators have currently no easy w...

X Description: Summary Two small visibility improvements to the LINSTOR template-handling path. Both preserve existing behaviour and only add log output that surfaces conditions operators have currently no easy w...

Opengraph URL: https://github.com/apache/cloudstack/pull/13078

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files/:range(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:4cf258fe-4c33-8b27-754a-0ff580699cc3
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idD5BC:17AB53:1F90FBC:2AC31DC:6A65575B
html-safe-noncee83a3cc40ed439d59632f6f0fdecddd29676d995d707f49e2c44f807f2bce86e
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENUJDOjE3QUI1MzoxRjkwRkJDOjJBQzMxREM6NkE2NTU3NUIiLCJ2aXNpdG9yX2lkIjoiOTU5Njg1MzUyODc3MjgzMTYzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac76a6521335d66ec117c1f43fc08b77355d9b3b33ceba9e38f2fd3733febabcb2
hovercard-subject-tagpull_request:3598531583
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/13078/files/4ee8d94f03e1636b3c1771650e56c9de8f36f206
twitter:imagehttps://avatars.githubusercontent.com/u/10476367?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/10476367?s=400&v=4
og:image:altSummary Two small visibility improvements to the LINSTOR template-handling path. Both preserve existing behaviour and only add log output that surfaces conditions operators have currently no easy w...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None52c76df668885aaff23b50bdca1fa1ea44ac9c1553e888ebc70ff1e4daa4625b
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
release309153364422b3c499922d1a2a6404910a58ed8e
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/apache/cloudstack/pull/13078/files/4ee8d94f03e1636b3c1771650e56c9de8f36f206#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fapache%2Fcloudstack%2Fpull%2F13078%2Ffiles%2F4ee8d94f03e1636b3c1771650e56c9de8f36f206
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
Code QualityEnforce quality at mergehttps://github.com/features/code-quality
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/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/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/enterprise/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%2F13078%2Ffiles%2F4ee8d94f03e1636b3c1771650e56c9de8f36f206
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/13078/files/4ee8d94f03e1636b3c1771650e56c9de8f36f206
Reloadhttps://github.com/apache/cloudstack/pull/13078/files/4ee8d94f03e1636b3c1771650e56c9de8f36f206
Reloadhttps://github.com/apache/cloudstack/pull/13078/files/4ee8d94f03e1636b3c1771650e56c9de8f36f206
Please reload this pagehttps://github.com/apache/cloudstack/pull/13078/files/4ee8d94f03e1636b3c1771650e56c9de8f36f206
apache https://github.com/apache
cloudstackhttps://github.com/apache/cloudstack
Notifications https://github.com/login?return_to=%2Fapache%2Fcloudstack
Fork 1.4k 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 555 https://github.com/apache/cloudstack/issues
Pull requests 271 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
DaanHooglandhttps://github.com/DaanHoogland
apache:mainhttps://github.com/apache/cloudstack/tree/main
jmsperu:feature/linstor-template-hygienehttps://github.com/jmsperu/cloudstack/tree/feature/linstor-template-hygiene
Conversation 26 https://github.com/apache/cloudstack/pull/13078
Commits 3 https://github.com/apache/cloudstack/pull/13078/commits
Checks 27 https://github.com/apache/cloudstack/pull/13078/checks
Files changed https://github.com/apache/cloudstack/pull/13078/files
Please reload this pagehttps://github.com/apache/cloudstack/pull/13078/files/4ee8d94f03e1636b3c1771650e56c9de8f36f206
fix(linstor): surface ambiguous template fallbacks and legacy orphan cleanup https://github.com/apache/cloudstack/pull/13078/files/4ee8d94f03e1636b3c1771650e56c9de8f36f206#top
Show all changes 3 commits https://github.com/apache/cloudstack/pull/13078/files
70eed01 fix(linstor): surface ambiguous template fallbacks and legacy templat… jmsperu Apr 28, 2026 https://github.com/apache/cloudstack/pull/13078/commits/70eed01218e4a8395f3fcf4ae7eec11e052597fd
eff9b09 fix(linstor): drop redundant startsWith check in deRefOrDeleteResource jmsperu May 9, 2026 https://github.com/apache/cloudstack/pull/13078/commits/eff9b09d510d0d9aa2e43f43600f69a7f4ba5c5a
4ee8d94 docs(linstor): clarify findResourceDefinition fallback comment jmsperu May 22, 2026 https://github.com/apache/cloudstack/pull/13078/commits/4ee8d94f03e1636b3c1771650e56c9de8f36f206
Clear filters https://github.com/apache/cloudstack/pull/13078/files/4ee8d94f03e1636b3c1771650e56c9de8f36f206
Please reload this pagehttps://github.com/apache/cloudstack/pull/13078/files/4ee8d94f03e1636b3c1771650e56c9de8f36f206
Please reload this pagehttps://github.com/apache/cloudstack/pull/13078/files/4ee8d94f03e1636b3c1771650e56c9de8f36f206
LinstorStorageAdaptor.java https://github.com/apache/cloudstack/pull/13078/files/4ee8d94f03e1636b3c1771650e56c9de8f36f206#diff-97b97a76cffb3459add1ef54938398d47b757f490c0f2ecbe3d7376a64710a25
LinstorUtil.java https://github.com/apache/cloudstack/pull/13078/files/4ee8d94f03e1636b3c1771650e56c9de8f36f206#diff-731ad300b3b2ee299a13dcedd630ed047ed174431311ba04522fedb3c2403a63
https://github.com/apache/cloudstack/blob/main/.github/CODEOWNERS#L18
.../volume/linstor/src/main/java/com/cloud/hypervisor/kvm/storage/LinstorStorageAdaptor.javahttps://github.com/apache/cloudstack/pull/13078/files/4ee8d94f03e1636b3c1771650e56c9de8f36f206#diff-97b97a76cffb3459add1ef54938398d47b757f490c0f2ecbe3d7376a64710a25
View file https://github.com/jmsperu/cloudstack/blob/4ee8d94f03e1636b3c1771650e56c9de8f36f206/plugins/storage/volume/linstor/src/main/java/com/cloud/hypervisor/kvm/storage/LinstorStorageAdaptor.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/apache/cloudstack/pull/13078/files/{{ revealButtonHref }}
https://github.com/apache/cloudstack/pull/13078/files/4ee8d94f03e1636b3c1771650e56c9de8f36f206#diff-97b97a76cffb3459add1ef54938398d47b757f490c0f2ecbe3d7376a64710a25
https://github.com/apache/cloudstack/pull/13078/files/4ee8d94f03e1636b3c1771650e56c9de8f36f206#diff-97b97a76cffb3459add1ef54938398d47b757f490c0f2ecbe3d7376a64710a25
https://github.com/apache/cloudstack/blob/main/.github/CODEOWNERS#L18
...olume/linstor/src/main/java/org/apache/cloudstack/storage/datastore/util/LinstorUtil.javahttps://github.com/apache/cloudstack/pull/13078/files/4ee8d94f03e1636b3c1771650e56c9de8f36f206#diff-731ad300b3b2ee299a13dcedd630ed047ed174431311ba04522fedb3c2403a63
View file https://github.com/jmsperu/cloudstack/blob/4ee8d94f03e1636b3c1771650e56c9de8f36f206/plugins/storage/volume/linstor/src/main/java/org/apache/cloudstack/storage/datastore/util/LinstorUtil.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/apache/cloudstack/pull/13078/files/{{ revealButtonHref }}
https://github.com/apache/cloudstack/pull/13078/files/4ee8d94f03e1636b3c1771650e56c9de8f36f206#diff-731ad300b3b2ee299a13dcedd630ed047ed174431311ba04522fedb3c2403a63
https://github.com/apache/cloudstack/pull/13078/files/4ee8d94f03e1636b3c1771650e56c9de8f36f206#diff-731ad300b3b2ee299a13dcedd630ed047ed174431311ba04522fedb3c2403a63
Please reload this pagehttps://github.com/apache/cloudstack/pull/13078/files/4ee8d94f03e1636b3c1771650e56c9de8f36f206
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.