kubernetes / cloud-provider-openstack

Apache License 2.0
616 stars 601 forks source link

[cinder-csi-plugin] resize of volume failed #1437

Closed jichenjc closed 3 years ago

jichenjc commented 3 years ago

Is this a BUG REPORT or FEATURE REQUEST?:

Uncomment only one, leave it on its own line:

/kind bug /kind feature

What happened:

reported this before and can't find it now, so re-report and see whether we can improve

following the resize guide and the volume changed from 1G to 2G

# kubectl get pvc
NAME                    STATUS   VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS          AGE
csi-pvc-cinderplugin    Bound    pvc-af9ecbfa-78c1-46eb-8b89-8835808a469a   2Gi        RWO            csi-sc-cinderplugin   68m
csi-pvc-cinderplugin1   Bound    pvc-3ed8dbed-1da7-4a19-b4f2-f06416da9c6b   2Gi        RWO            csi-sc-cinderplugin   60m

and logs shows

I0311 04:35:21.807237       1 mount_linux.go:405] Attempting to determine if disk "/dev/vdf" is formatted using blkid with args: ([-p -s TYPE -s PTTYPE -o export /dev/vdf])
I0311 04:35:21.810667       1 mount_linux.go:408] Output: "DEVNAME=/dev/vdf\nTYPE=ext4\n", err: <nil>
I0311 04:35:21.810691       1 resizefs_linux.go:53] ResizeFS.Resize - Expanding mounted volume /dev/vdf
I0311 04:35:21.814298       1 resizefs_linux.go:66] Device /dev/vdf resized successfully

resize ok, but the size is still actually 1G

# kubectl exec nginx1 -- df -h /var/lib/www/html
Filesystem      Size  Used Avail Use% Mounted on
/dev/vdf        976M  2.6M  958M   1% /var/lib/www/html

image

I don't have admin cred for this openstack so don't know why failed to extend (maybe policy ? ) but anyway better to detect this and report to upper layer... What you expected to happen:

How to reproduce it:

Anything else we need to know?:

Environment:

ramineni commented 3 years ago

@jichenjc Can we close this? with recent change, the failure is reported well before right?

jichenjc commented 3 years ago

yes, I think at least we prevent that happen