René's URL Explorer Experiment


Title: Fix bug in cloud client missing the project id and refactor the package by elivlo · Pull Request #7 · cloudstack/cloudstack-csi-driver · GitHub

Open Graph Title: Fix bug in cloud client missing the project id and refactor the package by elivlo · Pull Request #7 · cloudstack/cloudstack-csi-driver

X Title: Fix bug in cloud client missing the project id and refactor the package by elivlo · Pull Request #7 · cloudstack/cloudstack-csi-driver

Description: Description of changes: The client only uses the project ID in the function GetVMByID and not in the function getVMByName. This causes the CSI where the instance ID is not found in the metadata and the VM is in a project to fail. Eventually they fall back into a crash loop back off and the CSI is not usable. It refactors all functions of the cloud package to use the default project_id option. This reduces code duplication by using cloudstack client methods that support the default options. This refactoring is based on the following fix: It fixes the function getVMByName by using the method GetVirtualMachineByName instead of ListVirtualMachines. These changes ensure that the project id is automatically included and makes the code more mature. Testing performed: I installed k8s into Cloudstack inside of a project and without. The setup of the CSI worked when running in the root project but not in sub projects with the current version 3.0.0. I am using my PR version currently in a cluster on a Cloudstack instance within a project and with that it is working just fine. Please create a bugfix release when the PR is approved and merged. By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Open Graph Description: Description of changes: The client only uses the project ID in the function GetVMByID and not in the function getVMByName. This causes the CSI where the instance ID is not found in the metadata and...

X Description: Description of changes: The client only uses the project ID in the function GetVMByID and not in the function getVMByName. This causes the CSI where the instance ID is not found in the metadata and...

Opengraph URL: https://github.com/cloudstack/cloudstack-csi-driver/pull/7

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:fdb8cd82-684a-c553-3ca3-7569ccf1f966
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idCBBA:30372D:13B7823:1CC30AC:6A4E456D
html-safe-noncef2d0d532e9346670b858069f170b15efb77735df1afdb67906f1abe6d4e8f0d7
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQkJBOjMwMzcyRDoxM0I3ODIzOjFDQzMwQUM6NkE0RTQ1NkQiLCJ2aXNpdG9yX2lkIjoiOTA5Nzg0MTczMjM5Nzk3NDg5MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac361357b0b32807088e85269336badcfab7f1d4934cd9b93607c8060679d5ebee
hovercard-subject-tagpull_request:3482835333
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/cloudstack/cloudstack-csi-driver/pull/7/files
twitter:imagehttps://avatars.githubusercontent.com/u/28390981?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/28390981?s=400&v=4
og:image:altDescription of changes: The client only uses the project ID in the function GetVMByID and not in the function getVMByName. This causes the CSI where the instance ID is not found in the metadata and...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None030096ee0db095447bfe77409d33bfac127ca7128299c58deef27c52eaa1b1f0
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/cloudstack/cloudstack-csi-driver git https://github.com/cloudstack/cloudstack-csi-driver.git
octolytics-dimension-user_id16351256
octolytics-dimension-user_logincloudstack
octolytics-dimension-repository_id1055410949
octolytics-dimension-repository_nwocloudstack/cloudstack-csi-driver
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forktrue
octolytics-dimension-repository_parent_id835232646
octolytics-dimension-repository_parent_nwoshapeblue/cloudstack-csi-driver
octolytics-dimension-repository_network_root_id835232646
octolytics-dimension-repository_network_root_nwoshapeblue/cloudstack-csi-driver
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
release9fabff9b8b127e686a3ec86f91422e818056ca2c
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/cloudstack/cloudstack-csi-driver/pull/7/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcloudstack%2Fcloudstack-csi-driver%2Fpull%2F7%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%2Fcloudstack%2Fcloudstack-csi-driver%2Fpull%2F7%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=cloudstack%2Fcloudstack-csi-driver
Reloadhttps://github.com/cloudstack/cloudstack-csi-driver/pull/7/files
Reloadhttps://github.com/cloudstack/cloudstack-csi-driver/pull/7/files
Reloadhttps://github.com/cloudstack/cloudstack-csi-driver/pull/7/files
Please reload this pagehttps://github.com/cloudstack/cloudstack-csi-driver/pull/7/files
cloudstack https://github.com/cloudstack
cloudstack-csi-driverhttps://github.com/cloudstack/cloudstack-csi-driver
shapeblue/cloudstack-csi-driverhttps://github.com/shapeblue/cloudstack-csi-driver
Notifications https://github.com/login?return_to=%2Fcloudstack%2Fcloudstack-csi-driver
Fork 2 https://github.com/login?return_to=%2Fcloudstack%2Fcloudstack-csi-driver
Star 5 https://github.com/login?return_to=%2Fcloudstack%2Fcloudstack-csi-driver
Code https://github.com/cloudstack/cloudstack-csi-driver
Pull requests 2 https://github.com/cloudstack/cloudstack-csi-driver/pulls
Actions https://github.com/cloudstack/cloudstack-csi-driver/actions
Projects https://github.com/cloudstack/cloudstack-csi-driver/projects
Security and quality 0 https://github.com/cloudstack/cloudstack-csi-driver/security
Insights https://github.com/cloudstack/cloudstack-csi-driver/pulse
Code https://github.com/cloudstack/cloudstack-csi-driver
Pull requests https://github.com/cloudstack/cloudstack-csi-driver/pulls
Actions https://github.com/cloudstack/cloudstack-csi-driver/actions
Projects https://github.com/cloudstack/cloudstack-csi-driver/projects
Security and quality https://github.com/cloudstack/cloudstack-csi-driver/security
Insights https://github.com/cloudstack/cloudstack-csi-driver/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fcloudstack%2Fcloudstack-csi-driver%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fcloudstack%2Fcloudstack-csi-driver%2Fissues%2Fnew%2Fchoose
elivlohttps://github.com/elivlo
cloudstack:mainhttps://github.com/cloudstack/cloudstack-csi-driver/tree/main
elivlo:refactor-cloud-clienthttps://github.com/elivlo/cloudstack-csi-driver/tree/refactor-cloud-client
Conversation 1 https://github.com/cloudstack/cloudstack-csi-driver/pull/7
Commits 11 https://github.com/cloudstack/cloudstack-csi-driver/pull/7/commits
Checks 3 https://github.com/cloudstack/cloudstack-csi-driver/pull/7/checks
Files changed https://github.com/cloudstack/cloudstack-csi-driver/pull/7/files
Please reload this pagehttps://github.com/cloudstack/cloudstack-csi-driver/pull/7/files
Fix bug in cloud client missing the project id and refactor the package https://github.com/cloudstack/cloudstack-csi-driver/pull/7/files#top
Show all changes 11 commits https://github.com/cloudstack/cloudstack-csi-driver/pull/7/files
ceb019d Fix manifest creation caused by missing linebreaks elivlo Nov 5, 2025 https://github.com/cloudstack/cloudstack-csi-driver/pull/7/commits/ceb019d5e979a25cefa269e97f64687079284cf8
fcba53c Add empty option to description for metadataSource as possible entry elivlo Nov 5, 2025 https://github.com/cloudstack/cloudstack-csi-driver/pull/7/commits/fcba53cf9ee2b40120404eb6d2c116c2bad2887d
c22f761 Bump app version to 3.0.0 of csi driver in helm chart elivlo Nov 5, 2025 https://github.com/cloudstack/cloudstack-csi-driver/pull/7/commits/c22f761deeae925b94158ac6afeeae8ab0678a82
f79a93f Fix bug in client to also use project id when getting VM by name elivlo Feb 25, 2026 https://github.com/cloudstack/cloudstack-csi-driver/pull/7/commits/f79a93f1c078d7e4bdf90c85c7943607065aac5e
18ef184 Remove all occurrence of global projectID in cloudstack client becaus… elivlo Feb 25, 2026 https://github.com/cloudstack/cloudstack-csi-driver/pull/7/commits/18ef184e4de664e4c58c100866376b21ebccb8a1
bfbf5f6 Sanitize snapshot functions to require required arguments elivlo Feb 25, 2026 https://github.com/cloudstack/cloudstack-csi-driver/pull/7/commits/bfbf5f642c18630ea7557c8974fcb75544351f28
bfa4713 Refactor cloud client to use project id default with other cloudstack… elivlo Feb 26, 2026 https://github.com/cloudstack/cloudstack-csi-driver/pull/7/commits/bfa47131f2122500d93b390d699d588f66e1a787
f508ea3 Change description for default project id options elivlo Feb 26, 2026 https://github.com/cloudstack/cloudstack-csi-driver/pull/7/commits/f508ea36ac5db99c3be43731ef08e077216a1b8d
fa0c9f5 Add back the count checks in vms, volumes, snapshots to not break the… elivlo Mar 4, 2026 https://github.com/cloudstack/cloudstack-csi-driver/pull/7/commits/fa0c9f5176543aded85c2dcfee444cc2674a969e
cb3aca6 Add ttl for syncer job so helm upgrade won't fail because job templat… elivlo Mar 4, 2026 https://github.com/cloudstack/cloudstack-csi-driver/pull/7/commits/cb3aca6a08f5429c3c694a831a05099c9cf4d112
3c7ce06 Merge branch 'main' into refactor-cloud-client elivlo Mar 4, 2026 https://github.com/cloudstack/cloudstack-csi-driver/pull/7/commits/3c7ce06058696d4b27c69edc29a355ae13642b64
Clear filters https://github.com/cloudstack/cloudstack-csi-driver/pull/7/files
Please reload this pagehttps://github.com/cloudstack/cloudstack-csi-driver/pull/7/files
Please reload this pagehttps://github.com/cloudstack/cloudstack-csi-driver/pull/7/files
Chart.yaml https://github.com/cloudstack/cloudstack-csi-driver/pull/7/files#diff-024aeeceb9ec75d87ee82dc6ab8d124ccfbeddedc389dbffb89a03cfa721afb2
syncer-job.yaml https://github.com/cloudstack/cloudstack-csi-driver/pull/7/files#diff-7d92f3cf93fc879040cb6bf288c3b4941b64cfd3ffb02162dc4cc5102ef32e7b
values.yaml https://github.com/cloudstack/cloudstack-csi-driver/pull/7/files#diff-835ae4b5a23cd72d3f2a04834deea1aa5693aeb4fc7879140c54a8cb6e06b365
cloud.go https://github.com/cloudstack/cloudstack-csi-driver/pull/7/files#diff-d7ef58b21290a74508c38ca5fdcd104ca5d098820cfac0681ba5415c9820c91d
snapshots.go https://github.com/cloudstack/cloudstack-csi-driver/pull/7/files#diff-6f8702fa242c7d2d29dcb7469f4602d8dbdd71f08534869310fc08dbf870b1cd
vms.go https://github.com/cloudstack/cloudstack-csi-driver/pull/7/files#diff-0ff8c57f2da5192ebfc922320636e8a0d71d5958640e756f8f3ef37051a8dc46
volumes.go https://github.com/cloudstack/cloudstack-csi-driver/pull/7/files#diff-0b13a46a5e25c48da65fe53637527fc3d3c55cac9d1a57ddd35e717d44180b92
charts/cloudstack-csi/Chart.yamlhttps://github.com/cloudstack/cloudstack-csi-driver/pull/7/files#diff-024aeeceb9ec75d87ee82dc6ab8d124ccfbeddedc389dbffb89a03cfa721afb2
View file https://github.com/cloudstack/cloudstack-csi-driver/blob/3c7ce06058696d4b27c69edc29a355ae13642b64/charts/cloudstack-csi/Chart.yaml
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/cloudstack/cloudstack-csi-driver/pull/7/{{ revealButtonHref }}
https://github.com/cloudstack/cloudstack-csi-driver/pull/7/files#diff-024aeeceb9ec75d87ee82dc6ab8d124ccfbeddedc389dbffb89a03cfa721afb2
https://github.com/cloudstack/cloudstack-csi-driver/pull/7/files#diff-024aeeceb9ec75d87ee82dc6ab8d124ccfbeddedc389dbffb89a03cfa721afb2
charts/cloudstack-csi/templates/syncer-job.yamlhttps://github.com/cloudstack/cloudstack-csi-driver/pull/7/files#diff-7d92f3cf93fc879040cb6bf288c3b4941b64cfd3ffb02162dc4cc5102ef32e7b
View file https://github.com/cloudstack/cloudstack-csi-driver/blob/3c7ce06058696d4b27c69edc29a355ae13642b64/charts/cloudstack-csi/templates/syncer-job.yaml
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/cloudstack/cloudstack-csi-driver/pull/7/{{ revealButtonHref }}
https://github.com/cloudstack/cloudstack-csi-driver/pull/7/files#diff-7d92f3cf93fc879040cb6bf288c3b4941b64cfd3ffb02162dc4cc5102ef32e7b
https://github.com/cloudstack/cloudstack-csi-driver/pull/7/files#diff-7d92f3cf93fc879040cb6bf288c3b4941b64cfd3ffb02162dc4cc5102ef32e7b
charts/cloudstack-csi/values.yamlhttps://github.com/cloudstack/cloudstack-csi-driver/pull/7/files#diff-835ae4b5a23cd72d3f2a04834deea1aa5693aeb4fc7879140c54a8cb6e06b365
View file https://github.com/cloudstack/cloudstack-csi-driver/blob/3c7ce06058696d4b27c69edc29a355ae13642b64/charts/cloudstack-csi/values.yaml
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/cloudstack/cloudstack-csi-driver/pull/7/{{ revealButtonHref }}
https://github.com/cloudstack/cloudstack-csi-driver/pull/7/files#diff-835ae4b5a23cd72d3f2a04834deea1aa5693aeb4fc7879140c54a8cb6e06b365
https://github.com/cloudstack/cloudstack-csi-driver/pull/7/files#diff-835ae4b5a23cd72d3f2a04834deea1aa5693aeb4fc7879140c54a8cb6e06b365
pkg/cloud/cloud.gohttps://github.com/cloudstack/cloudstack-csi-driver/pull/7/files#diff-d7ef58b21290a74508c38ca5fdcd104ca5d098820cfac0681ba5415c9820c91d
View file https://github.com/cloudstack/cloudstack-csi-driver/blob/3c7ce06058696d4b27c69edc29a355ae13642b64/pkg/cloud/cloud.go
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/cloudstack/cloudstack-csi-driver/pull/7/{{ revealButtonHref }}
https://github.com/cloudstack/cloudstack-csi-driver/pull/7/files#diff-d7ef58b21290a74508c38ca5fdcd104ca5d098820cfac0681ba5415c9820c91d
https://github.com/cloudstack/cloudstack-csi-driver/pull/7/files#diff-d7ef58b21290a74508c38ca5fdcd104ca5d098820cfac0681ba5415c9820c91d
https://github.com/cloudstack/cloudstack-csi-driver/pull/7/files#diff-d7ef58b21290a74508c38ca5fdcd104ca5d098820cfac0681ba5415c9820c91d
https://github.com/cloudstack/cloudstack-csi-driver/pull/7/files#diff-d7ef58b21290a74508c38ca5fdcd104ca5d098820cfac0681ba5415c9820c91d
https://github.com/cloudstack/cloudstack-csi-driver/pull/7/files#diff-d7ef58b21290a74508c38ca5fdcd104ca5d098820cfac0681ba5415c9820c91d
pkg/cloud/snapshots.gohttps://github.com/cloudstack/cloudstack-csi-driver/pull/7/files#diff-6f8702fa242c7d2d29dcb7469f4602d8dbdd71f08534869310fc08dbf870b1cd
View file https://github.com/cloudstack/cloudstack-csi-driver/blob/3c7ce06058696d4b27c69edc29a355ae13642b64/pkg/cloud/snapshots.go
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/cloudstack/cloudstack-csi-driver/pull/7/{{ revealButtonHref }}
https://github.com/cloudstack/cloudstack-csi-driver/pull/7/files#diff-6f8702fa242c7d2d29dcb7469f4602d8dbdd71f08534869310fc08dbf870b1cd
https://github.com/cloudstack/cloudstack-csi-driver/pull/7/files#diff-6f8702fa242c7d2d29dcb7469f4602d8dbdd71f08534869310fc08dbf870b1cd
https://github.com/cloudstack/cloudstack-csi-driver/pull/7/files#diff-6f8702fa242c7d2d29dcb7469f4602d8dbdd71f08534869310fc08dbf870b1cd
https://github.com/cloudstack/cloudstack-csi-driver/pull/7/files#diff-6f8702fa242c7d2d29dcb7469f4602d8dbdd71f08534869310fc08dbf870b1cd
https://github.com/cloudstack/cloudstack-csi-driver/pull/7/files#diff-6f8702fa242c7d2d29dcb7469f4602d8dbdd71f08534869310fc08dbf870b1cd
pkg/cloud/vms.gohttps://github.com/cloudstack/cloudstack-csi-driver/pull/7/files#diff-0ff8c57f2da5192ebfc922320636e8a0d71d5958640e756f8f3ef37051a8dc46
View file https://github.com/cloudstack/cloudstack-csi-driver/blob/3c7ce06058696d4b27c69edc29a355ae13642b64/pkg/cloud/vms.go
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/cloudstack/cloudstack-csi-driver/pull/7/{{ revealButtonHref }}
https://github.com/cloudstack/cloudstack-csi-driver/pull/7/files#diff-0ff8c57f2da5192ebfc922320636e8a0d71d5958640e756f8f3ef37051a8dc46
https://github.com/cloudstack/cloudstack-csi-driver/pull/7/files#diff-0ff8c57f2da5192ebfc922320636e8a0d71d5958640e756f8f3ef37051a8dc46
https://github.com/cloudstack/cloudstack-csi-driver/pull/7/files#diff-0ff8c57f2da5192ebfc922320636e8a0d71d5958640e756f8f3ef37051a8dc46
Please reload this pagehttps://github.com/cloudstack/cloudstack-csi-driver/pull/7/files
Please reload this pagehttps://github.com/cloudstack/cloudstack-csi-driver/pull/7/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.