Fix bug in cloud client missing the project id and refactor the package#7
Fix bug in cloud client missing the project id and refactor the package#7elivlo wants to merge 7 commits into
Conversation
|
@Pearl1594 any chance to get a review on this one? |
|
This PR would also fix volume resize for project-owned volumes — reported in apache/cloudstack#13634. On v3.0.0 / 3.0.1 / |
3c7ce06 to
c1cc366
Compare
c1cc366 to
1b9cbaa
Compare
|
@Pearl1594 I have fixed the comment and rebased my branch on the main branch. It is now ready to merge. Should I also update the helm |
Description of changes:
The client only uses the project ID in the function
GetVMByIDand not in the functiongetVMByName. 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
cloudpackage to use the default project_id option. This reduces code duplication by using cloudstack clientmethodsthat support the default options. This refactoring is based on the following fix: It fixes the functiongetVMByNameby using the methodGetVirtualMachineByNameinstead ofListVirtualMachines.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.