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
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files/:range(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:4cf258fe-4c33-8b27-754a-0ff580699cc3 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | D5BC:17AB53:1F90FBC:2AC31DC:6A65575B |
| html-safe-nonce | e83a3cc40ed439d59632f6f0fdecddd29676d995d707f49e2c44f807f2bce86e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENUJDOjE3QUI1MzoxRjkwRkJDOjJBQzMxREM6NkE2NTU3NUIiLCJ2aXNpdG9yX2lkIjoiOTU5Njg1MzUyODc3MjgzMTYzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 76a6521335d66ec117c1f43fc08b77355d9b3b33ceba9e38f2fd3733febabcb2 |
| hovercard-subject-tag | pull_request:3598531583 |
| 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/13078/files/4ee8d94f03e1636b3c1771650e56c9de8f36f206 |
| twitter:image | https://avatars.githubusercontent.com/u/10476367?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/10476367?s=400&v=4 |
| og:image:alt | 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... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 52c76df668885aaff23b50bdca1fa1ea44ac9c1553e888ebc70ff1e4daa4625b |
| 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 | 309153364422b3c499922d1a2a6404910a58ed8e |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width