-
Notifications
You must be signed in to change notification settings - Fork 39.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix locating resourcepool-path specified in the vsphere.conf file #66261
Fix locating resourcepool-path specified in the vsphere.conf file #66261
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: divyenpatel, SandeepPissay The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/test all [submit-queue is verifying that this PR is safe to merge] |
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions here. |
…-upstream-release-1.10 Automatic merge from submit-queue. Automated cherry pick of #66261 to upstream release-1.10 Cherry pick of #66261 on release-1.10 #66261: Fix locating resourcepool-path specified in the vsphere.conf file Release note: ``` Fix locating resourcepool-path specified in the vsphere.conf file ``` cc: @kubernetes/vmware
…-upstream-release-1.9 Automatic merge from submit-queue. Automated cherry pick of #66261 to upstream release-1.9 Cherry pick of #66261 on release-1.9 #66261: Fix locating resourcepool-path specified in the vsphere.conf file Release note: ``` Fix locating resourcepool-path specified in the vsphere.conf file ``` cc: @kubernetes/vmware
/sig vmware |
…-upstream-release-1.11 Automatic merge from submit-queue. Automated cherry pick of #66261 to upstream release-1.11 Cherry pick of #66261 on release-1.11 #66261: Fix locating resourcepool-path specified in the vsphere.conf file Release note: ``` Fix locating resourcepool-path specified in the vsphere.conf file ``` cc: @kubernetes/vmware
What this PR does / why we need it:
When volume is provisioned using the vsphere storage policy,
resourcepool-path
specified in thevsphere.conf
file is used for creating a shadow/dummy VM. Dummy VM is temporarily created and then deleted once volume is created on the compatible Datastore.At present If user specifies
resourcepool-path
in thevsphere.conf
file, volume provisioner is not able to locate the compute resource for the given path. This is because look up is made usingfinder.DefaultComputeResource(ctx)
andfinder.ComputeResource(ctx, computePath)
, which is not correct. If user specifies name of the cluster or cluster path then provisioning works.This is resolved with using correct govmomi method -
func (f *Finder) ResourcePoolOrDefault(ctx context.Context, path string) (*object.ResourcePool, error)
Which issue(s) this PR fixes
Fixes # vmware-archive#493
Special notes for your reviewer:
Following testing is performed for this change.
vsphere.conf
file and verified VM is created under the specified resource pool.vsphere.conf
file and verified volume provisioning works. For this case, VM is directly created under cluster.As expected, provisioning is failing with
Failed to provision volume with StorageClass "vsan-gold-policy": no default resource pool found
.Refer to this datacenter inventory for the path specified in the
resourcepool-path
configuration.Current documentation describes
resourcepool-path
configuration is optional, which needs to be corrected once PR is merged. For policy based provisioning this is not an optional parameter.Documentation link: https://vmware.github.io/vsphere-storage-for-kubernetes/documentation/existing.html
Release note:
cc: @kubernetes/vmware