Skip to content
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 for vanilla file services solution in a VC deployment when there is no cluster available in a datacenter #460

Merged

Conversation

BaluDontu
Copy link
Contributor

What this PR does / why we need it:
Currently we fail if the datacenters doesn't have any clusters inside it - https://github.com/kubernetes-sigs/vsphere-csi-driver/blob/master/pkg/csi/service/common/vsphereutil.go#L518. But it is also possible to have ESX hosts directly inside the DC without a cluster. In that case it gives following error

2020-10-20T23:18:51.772Z ERROR common/vsphereutil.go:610 Error occurred while getting clusterComputeResource. error: cluster '*' not found {"TraceId": "d1141ed4-40ac-430a-885c-6b07fbf47189"}
sigs.k8s.io/vsphere-csi-driver/pkg/csi/service/common.getDsToFileServiceEnabledMap
/build/pkg/csi/service/common/vsphereutil.go:610
sigs.k8s.io/vsphere-csi-driver/pkg/csi/service/common.IsFileServiceEnabled
/build/pkg/csi/service/common/vsphereutil.go:567
sigs.k8s.io/vsphere-csi-driver/pkg/csi/service/common.GenerateDatastoreMapForFileVolumes
/build/pkg/csi/service/common/authmanager.go:240
sigs.k8s.io/vsphere-csi-driver/pkg/csi/service/common.(*AuthManager).refreshDatastoreMapForFileVolumes
/build/pkg/csi/service/common/authmanager.go:129
sigs.k8s.io/vsphere-csi-driver/pkg/csi/service/common.ComputeDatastoreMapForFileVolumes
/build/pkg/csi/service/common/authmanager.go:156

This function is internally called via IsFileServiceEnabled as part vanilla CSI controller init - https://github.com/kubernetes-sigs/vsphere-csi-driver/blob/master/pkg/csi/service/vanilla/controller.go#L133

since this is a valid deployment, this PR provides a fix for it.

This bug seems to exist from the time when vanilla file services solutions is released.

Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes # #455

Release note:

Fix for vanilla file services solution in a VC deployment when there is no cluster available in a datacenter

cc @divyenpatel @chethanv28

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Oct 22, 2020
@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Oct 22, 2020
Copy link
Member

@divyenpatel divyenpatel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve

@svcbot-qecnsdp
Copy link

Started vanilla file pipeline...

@chethanv28
Copy link
Collaborator

/ok-to-test

@k8s-ci-robot k8s-ci-robot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Oct 23, 2020
@chethanv28
Copy link
Collaborator

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: BaluDontu, chethanv28, divyenpatel

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:
  • OWNERS [BaluDontu,chethanv28,divyenpatel]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@svcbot-qecnsdp
Copy link

File vanilla build status: FAILURE 
Stage before exit: testbed-deploy 

@SandeepPissay
Copy link
Contributor

The change looks good to me. Can you describe the testing done for this PR?

@svcbot-qecnsdp
Copy link

Started vanilla file pipeline...

@svcbot-qecnsdp
Copy link

File vanilla build status: FAILURE 
Stage before exit: testbed-deploy 

@svcbot-qecnsdp
Copy link

Started vanilla file pipeline...

@svcbot-qecnsdp
Copy link

File vanilla build status: FAILURE 
Stage before exit: e2e-tests 
Jenkins E2E Test Results: 
Ran 24 of 149 Specs in 2408.242 seconds
FAIL! -- 23 Passed | 1 Failed | 0 Pending | 125 Skipped
--- FAIL: TestE2E (2408.27s)
FAIL

Ginkgo ran 1 suite in 40m32.212036343s
Test Suite Failed
make: Leaving directory `/home/worker/workspace/github-csi-file-vanilla/Results/91/vsphere-csi-driver`

@divyenpatel
Copy link
Member

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 27, 2020
@k8s-ci-robot k8s-ci-robot merged commit c41ae6e into kubernetes-sigs:master Oct 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-2.1.0-candidate release-2.1.0-cherry-picked size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants