Closed lijhnihaoa closed 1 year ago
NAMESPACE NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE kube-csi 1369-csi-pvc-1 Bound pvc-d40c53c6-5d61-4c01-80d8-0d2b9f60d5f9 128Mi RWO spdkcsi-sc-nvme 3h30m [root@compute1 v1-1369]# kubectl get pv NAME CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM STORAGECLASS REASON AGE pvc-d40c53c6-5d61-4c01-80d8-0d2b9f60d5f9 512Mi RWO Delete Bound kube-csi/1369-csi-pvc-1 spdkcsi-sc-nvme 3h30m
pkg/controller/controller.go
err := func() error { newSize, fsResizeRequired, err := ctrl.resizeVolume(pvc, pv) if err != nil { return err } if fsResizeRequired { // Resize volume succeeded and need to resize file system by kubelet, mark it as file system resizing required. return ctrl.markPVCAsFSResizeRequired(pvc) } // Resize volume succeeded and no need to resize file system by kubelet, mark it as resizing finished. return ctrl.markPVCResizeFinished(pvc, newSize) }()
Why not use ctrl.markPVCResizeFinished(pvc, newSize), ctrl.markPVCAsFSResizeRequired(pvc) did not change the volume of PVC
Can you explain in some detail, what you were doing and what happened and what you were expecting to happen? It is little bit hard to decipher underlying bug from just the error messages.
I'm sorry, I looked at the code carefully and found that if NodeExpandVolume is not required, the parameter NodeExpansionRequired needs to be passed to false in order to talk about the size of the pvc synchronously
Yea that is correct. if no node expansion is required for the volume, CSI driver must return false
as return value and in which case pvc size should be updated completely solely after controller expansion.
Please close the bug, if this worked as expected.
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.
This bot triages issues and PRs according to the following rules:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the issue is closedYou can:
/remove-lifecycle stale
/lifecycle rotten
/close
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.
This bot triages un-triaged issues according to the following rules:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the issue is closedYou can:
/remove-lifecycle rotten
/close
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle rotten
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.
This bot triages issues according to the following rules:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the issue is closedYou can:
/reopen
/remove-lifecycle rotten
Please send feedback to sig-contributor-experience at kubernetes/community.
/close not-planned
@k8s-triage-robot: Closing this issue, marking it as "Not Planned".
I1028 10:56:46.042219 1 controller.go:295] Started PVC processing "kube-csi/1369-csi-pvc-1" I1028 10:56:46.052299 1 connection.go:183] GRPC call: /csi.v1.Controller/ControllerGetCapabilities I1028 10:56:46.052311 1 connection.go:184] GRPC request: {} I1028 10:56:46.052452 1 event.go:285] Event(v1.ObjectReference{Kind:"PersistentVolumeClaim", Namespace:"kube-csi", Name:"1369-csi-pvc-1", UID:"d40c53c6-5d61-4c01-80d8-0d2b9f60d5f9", APIVersion:"v1", ResourceVersion:"3528288", FieldPath:""}): type: 'Normal' reason: 'Resizing' External resizer is resizing volume pvc-d40c53c6-5d61-4c01-80d8-0d2b9f60d5f9 I1028 10:56:46.053139 1 connection.go:186] GRPC response: {"capabilities":[{"Type":{"Rpc":{"type":1}}},{"Type":{"Rpc":{"type":5}}},{"Type":{"Rpc":{"type":9}}},{"Type":{"Rpc":{"type":7}}}]} I1028 10:56:46.053275 1 connection.go:187] GRPC error: <nil> I1028 10:56:46.053305 1 connection.go:183] GRPC call: /csi.v1.Controller/ControllerExpandVolume I1028 10:56:46.053314 1 connection.go:184] GRPC request: {"capacity_range":{"required_bytes":536870912},"volume_capability":{"AccessType":{"Mount":{"fs_type":"ext4"}},"access_mode":{"mode":1}},"volume_id":"10.15.22.140:8008nvme.tcp-20b89655-5ee9-4516-9ae5-659e4671f257"} I1028 10:56:46.063293 1 connection.go:186] GRPC response: {"capacity_bytes":536870912,"node_expansion_required":true} I1028 10:56:46.063348 1 connection.go:187] GRPC error: <nil> I1028 10:56:46.063357 1 controller.go:483] Resize volume succeeded for volume "pvc-d40c53c6-5d61-4c01-80d8-0d2b9f60d5f9", start to update PV's capacity I1028 10:56:46.063366 1 controller.go:590] Resize volume succeeded for volume "pvc-d40c53c6-5d61-4c01-80d8-0d2b9f60d5f9", start to update PV's capacity I1028 10:56:46.066785 1 controller.go:489] Update capacity of PV "pvc-d40c53c6-5d61-4c01-80d8-0d2b9f60d5f9" to 512Mi succeeded I1028 10:56:46.070404 1 controller.go:511] Mark PVC "kube-csi/1369-csi-pvc-1" as file system resize required I1028 10:56:46.070459 1 controller.go:295] Started PVC processing "kube-csi/1369-csi-pvc-1" I1028 10:56:46.070474 1 controller.go:352] No need to resize PV "pvc-d40c53c6-5d61-4c01-80d8-0d2b9f60d5f9" I1028 10:56:46.070494 1 controller.go:295] Started PVC processing "kube-csi/1369-csi-pvc-1" I1028 10:56:46.070515 1 controller.go:352] No need to resize PV "pvc-d40c53c6-5d61-4c01-80d8-0d2b9f60d5f9" I1028 10:56:46.070519 1 event.go:285] Event(v1.ObjectReference{Kind:"PersistentVolumeClaim", Namespace:"kube-csi", Name:"1369-csi-pvc-1", UID:"d40c53c6-5d61-4c01-80d8-0d2b9f60d5f9", APIVersion:"v1", ResourceVersion:"3528288", FieldPath:""}): type: 'Normal' reason: 'FileSystemResizeRequired' Require file system resize of volume on node