kubernetes-sigs / azurefile-csi-driver

Azure File CSI Driver
Apache License 2.0
147 stars 136 forks source link

PVC+PV using Bring Your Own Share throws warning when changing capacity request + capacity not updated #1928

Closed david-garcia-garcia closed 2 weeks ago

david-garcia-garcia commented 2 weeks ago

What happened:

Setup a PV bound to an existing file share. Then a PVC bound to that PV.

Need to update the capacity for both PV and PVC.

PV is updated OK, but PVC does not update the capacity properly:

Warning  VolumeResizeFailed  34s (x8 over 2m8s)  external-resizer file.csi.azure.com  resize vol │
│ ume "pvc-sandboxes-files-agudinya" by resizer "file.csi.azure.com" failed: rpc error: code = Inval │
│ idArgument desc = GetFileShareInfo(account-name_file-share-name) failed with error: error parsing  │
│ volume id: "account-name_file-share-name", should at least contain two #

The capacity request for the PVC is properly updated, but the actual available capacity not.

The only way to update now is to recreate the PVC.

Only left alternative is to create a whole bunch of new PV+PVC with the new capacity, reasign workloads, and delete old PV+PVC.

What you expected to happen:

Not sure what the behavior should be when BYO Share is used in terms of capacity management, I did not find anything in the docs about it. The most natural behaviour I believe would be that in these cases no capacity management at all is done by the driver.

Environment:

Kubernetes: 1.29.4 CSI driver: 1.30.2

andyzhangx commented 2 weeks ago

if you set volumeHandle as {resource-group-name}#{account-name}#{file-share-name}, resize should work.