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

improve logging for attempted vcenter requests #3149

Open
luanaBanana opened this issue Jan 7, 2025 · 1 comment
Open

improve logging for attempted vcenter requests #3149

luanaBanana opened this issue Jan 7, 2025 · 1 comment

Comments

@luanaBanana
Copy link

luanaBanana commented Jan 7, 2025

Is this a BUG REPORT or FEATURE REQUEST?:
/kind bug

What happened:

On creating a new PVC the vpshere CSI Controller throws these errors:

vsphere-csi-controller-5fcd4f5bf8-gdjzw vsphere-csi-controller 2025-01-07T19:43:00.901Z ERROR   vsphere/pbm.go:94       failed to get StoragePolicyID from StoragePolicyName XY with err: ServerFaultCode: Request missing value for required parameter 'profileIds' to method 'PbmRetrieveContent'    {"TraceId": "46777fb8-05b6-4f3b-8a9d-05cc5de94c23"}
 
vsphere-csi-controller-5fcd4f5bf8-gdjzw vsphere-csi-controller-5fcd4f5bf8-gdjzw csi-provisioner E0107 19:43:00.901913       1 controller.go:957] error syncing claim "b98f5515-ae59-4ada-b867-e090ed3fe66b": failed to provision volume with StorageClass "vsphere-csi": rpc error: code = Internal desc = failed to get policy ID for storage policy name "XY ". Error: ServerFaultCode: Request missing value for required parameter 'profileIds' to method 'PbmRetrieveContent'
vsphere-csi-controller google.golang.org/grpc.(*Server).serveStreams.func2.1

vsphere-csi-controller-5fcd4f5bf8-gdjzw vsphere-csi-controller 2025-01-07T19:43:00.901Z DEBUG   vanilla/controller.go:2024      createVolumeInternal: returns fault "csi.fault.Internal" {"TraceId": "46777fb8-05b6-4f3b-8a9d-05cc5de94c23"}

vsphere-csi-controller-5fcd4f5bf8-gdjzw vsphere-csi-controller 2025-01-07T19:43:00.901Z ERROR   vanilla/controller.go:2029      Operation failed, reporting failure status to Prometheus. Operation Type: "create-volume", Volume Type: "block", Fault Type: "csi.fault.Internal"        {"TraceId": "46777fb8-05b6-4f3b-8a9d-05cc5de94c23"}

apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: vsphere-csi
parameters:
  storagepolicyname: XY
provisioner: csi.vsphere.vmware.com
reclaimPolicy: Delete
volumeBindingMode: Immediate

The Storage Policy exists, I checked with govc and the UI. If it didn't there'd be other errors.
The same setup works with other clusters on other vcenter instances.

What you expected to happen:

Creation of PVC

How to reproduce it (as minimally and precisely as possible):

Not sure, I just created the PVC.

Anything else we need to know?:

I believe this error Request missing value for required parameter 'profileIds' to method 'PbmRetrieveContent'stems from this govomi method: https://github.com/vmware/govmomi/blob/8f7d2338c687642c7eb7dfe17ee7b2e26d809fd3/pbm/client.go#L212
used here by the controller: https://github.com/kubernetes-sigs/vsphere-csi-driver/blob/master/pkg/common/cns-lib/vsphere
/pbm.go#L92

Environment:

  • csi-vsphere version: 3.3.1
  • vsphere-cloud-controller-manager version: 1.32.1
  • Kubernetes version: 1.30
  • vSphere version: vSphere Client version 8.0.3.00400
  • OS (e.g. from /etc/os-release): Debian 12
  • Kernel (e.g. uname -a): Linux 6.1.0-27-amd64 SMP PREEMPT_DYNAMIC Debian 6.1.115-1 (2024-11-01) x86_64 GNU/Linux
  • Install tools: Kubeadm / ArgoCD
  • Others: -
@luanaBanana luanaBanana changed the title failed to get StoragePolicyID from StoragePolicyName improve logging for attempted vcenter requests Jan 9, 2025
@luanaBanana
Copy link
Author

Initially I opened this because I thought it was a bug. I found out that the user was lacking the correct rights. Upon adding them it solved the issue.
Nevertheless, the logs where misleading. A INFO entry suggesting that the user doesnt have permission would ease debugging by quite a bit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant