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

[manila-csi-plugin] Cannot extend the same volume twice #1666

Closed
m-k8s opened this issue Oct 12, 2021 · 2 comments · Fixed by #1667
Closed

[manila-csi-plugin] Cannot extend the same volume twice #1666

m-k8s opened this issue Oct 12, 2021 · 2 comments · Fixed by #1667
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@m-k8s
Copy link
Contributor

m-k8s commented Oct 12, 2021

Is this a BUG REPORT or FEATURE REQUEST?:

/kind bug

What happened:

When I extend the volume a second time I get this error message:

volume pvc-8f8e61c9-18b5-4706-9161-8346ddcc55bc is already being processed

What you expected to happen:

Resize volume succeeded

How to reproduce it:

  1. Create a persistentVolumeClaim:
cat <<EOF | kubectl apply -f -
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: client-pvc
  namespace: test-csi-nfs
spec:
  storageClassName: csi-manila-nfs
  accessModes:
    - ReadWriteMany
  resources:
    requests:
      storage: 1Gi
EOF
  1. Extend the volume for the first time by switching it to 2Gi, the expansion will work correctly
kubectl -n test-csi-nfs patch pvc client-pvc -p '{"spec":{"resources":{"requests":{"storage":"2Gi"}}}}'
  1. Extend the volume again by switching it to 3Gi:
kubectl -n test-csi-nfs patch pvc client-pvc -p '{"spec":{"resources":{"requests":{"storage":"3Gi"}}}}'

There is an error :

kubectl -n test-csi-nfs describe pvc client-pvc
...
Events
...
Warning  VolumeResizeFailed      0s (x2 over 2s)   external-resizer nfs.manila.csi.openstack.org    resize volume "pvc-c7a34569-7a3e-4b49-acf3-520f7e0d8651" by resizer "nfs.manila.csi.openstack.org" failed: rpc error: code = Aborted desc = volume pvc-c7a34569-7a3e-4b49-acf3-520f7e0d8651 is already being processed

Anything else we need to know?:

At line 451 of the controllerserver.go file, I think we should use the value of req.GetName() as the key to remove the volume from the pendingVolumes list instead of the value of share.Name

So when we extended the volume the first time, this volume always stayed in the pendingVolumes list while the volume is ready

https://github.com/kubernetes/cloud-provider-openstack/blob/master/pkg/csi/manila/controllerserver.go#L448-L451

Environment:

  • openstack-cloud-controller-manager(or other related binary) version: 1.22.0
  • OpenStack version: train
@k8s-ci-robot k8s-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Oct 12, 2021
@m-k8s
Copy link
Contributor Author

m-k8s commented Oct 12, 2021

/assign

@gouthampacha
Copy link
Contributor

Thanks for reporting this and for working on a fix, @alexisries - we'll get the patch reviewed.

k8s-ci-robot pushed a commit that referenced this issue Oct 13, 2021
…from pendingVolumes (#1667)

* [manila-csi-plugin] in ControllerExpandVolume fix bad key for pendingVolumes.Delete

/closes #1666

* [manila-csi-plugin] use share.Name to identify volumes in pendingVolumes.Delete
jingczhang pushed a commit to nokia/cloud-provider-openstack that referenced this issue Oct 18, 2021
…from pendingVolumes (kubernetes#1667)

* [manila-csi-plugin] in ControllerExpandVolume fix bad key for pendingVolumes.Delete

/closes kubernetes#1666

* [manila-csi-plugin] use share.Name to identify volumes in pendingVolumes.Delete
gman0 pushed a commit to gman0/cloud-provider-openstack that referenced this issue Oct 26, 2021
…from pendingVolumes (kubernetes#1667)

* [manila-csi-plugin] in ControllerExpandVolume fix bad key for pendingVolumes.Delete

/closes kubernetes#1666

* [manila-csi-plugin] use share.Name to identify volumes in pendingVolumes.Delete
k8s-ci-robot pushed a commit that referenced this issue Nov 2, 2021
…from pendingVolumes (#1667) (#1675)

* [manila-csi-plugin] in ControllerExpandVolume fix bad key for pendingVolumes.Delete

/closes #1666

* [manila-csi-plugin] use share.Name to identify volumes in pendingVolumes.Delete

Co-authored-by: Alexis Ries <42094254+alexisries@users.noreply.github.com>
powellchristoph pushed a commit to powellchristoph/cloud-provider-openstack that referenced this issue Jan 19, 2022
…from pendingVolumes (kubernetes#1667)

* [manila-csi-plugin] in ControllerExpandVolume fix bad key for pendingVolumes.Delete

/closes kubernetes#1666

* [manila-csi-plugin] use share.Name to identify volumes in pendingVolumes.Delete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
3 participants