kubernetes-sigs / vsphere-csi-driver

vSphere storage Container Storage Interface (CSI) plugin
https://docs.vmware.com/en/VMware-vSphere-Container-Storage-Plug-in/index.html
Apache License 2.0
293 stars 177 forks source link

fixed nil error causing error while marshaling #2830

Closed divyenpatel closed 5 months ago

divyenpatel commented 5 months ago

What this PR does / why we need it:

@adikul30 observed issue error while marshaling object when nil error is returned from ControllerUnpublishVolume call.

Fixes following error

{"level":"info","time":"2024-03-12T19:22:09.997090474Z","caller":"wcp/controller.go:1348","msg":"power state of pod vm: \"VirtualMachine:vm-1644\" is \"poweredOn\"","TraceId":"9fb89218-04f1-4172-9095-f298783af4fe"}
{"level":"info","time":"2024-03-12T19:22:09.997402038Z","caller":"wcp/controller.go:1397","msg":"Volume \"ca396804-4630-4e28-8e81-c03502b4d5c8\" detached successfully.","TraceId":"9fb89218-04f1-4172-9095-f298783af4fe"}
2024/03/12 19:22:09 ERROR: [core] [Server #1] grpc: server failed to encode response: rpc error: code = Internal desc = grpc: error while marshaling: proto: Marshal called with nil

Special notes for your reviewer:

Release note:

fixed nil error causing error while marshaling
adikul30 commented 5 months ago

/ok-to-test

adikul30 commented 5 months ago

/approve

k8s-ci-robot commented 5 months ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: adikul30, 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](https://github.com/kubernetes-sigs/vsphere-csi-driver/blob/master/OWNERS)~~ [adikul30,chethanv28,divyenpatel] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment