Volume expansion behavior when expansion fails

15 views
Skip to first unread message

apurv barve

unread,
Aug 5, 2020, 1:59:22 PM8/5/20
to container-storage-interface-community, Ben Swartzlander, Sandeep P S, Saad Ali, Hemant Kumar
Hi experts,

We were experimenting with a PV expansion scenario and when we tested a scenario where let us say Admin inadvertently gave incorrect size for the PV to grow to. Corresponding CSI driver would fail this operation but what we are seeing is that k8s continuously attempts expansion again with exponential back off time.  PV size is updated with the new size.
Now if we attempt to correct the size by doing "kubectl edit pv", this also fails. 

kubectl edit pvc csi-infoscale-pvc1

error: persistentvolumeclaims "csi-infoscale-pvc1" is invalid

A copy of your changes has been stored to "/tmp/kubectl-edit-zgff0.yaml"

error: Edit cancelled, no valid changes were saved.


What is the way to move forward in such situations? It could be a legitimate case where Admin gave incorrect size for the pv to expand to. But we need some method to get out of this state.

-- 
Regards,
Apurv

Hemant Kumar

unread,
Aug 5, 2020, 2:18:09 PM8/5/20
to apurv barve, container-storage-interface-community, Ben Swartzlander, Sandeep P S, Saad Ali
Hello,

This is expected until
https://github.com/kubernetes/enhancements/issues/1790 lands.

You can recover from this state by changing reclaimpolicy of PV to
delete and then deleting and recreating PVC and causing it to bind to
same PV and then restoring reclaimpolicy of PV.

Michelle Au

unread,
Aug 5, 2020, 2:20:50 PM8/5/20
to Hemant Kumar, apurv barve, container-storage-interface-community, Ben Swartzlander, Sandeep P S, Saad Ali
I think you meant reclaim policy of "Retain"?

--
You received this message because you are subscribed to the Google Groups "container-storage-interface-community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to container-storage-interf...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/container-storage-interface-community/CAHTCLtBvCxZBsr_geZpC5SZAX-sUvzvkM0F1YjfezX%3DZDEstxA%40mail.gmail.com.

Hemant Kumar

unread,
Aug 5, 2020, 2:23:39 PM8/5/20
to Michelle Au, apurv barve, container-storage-interface-community, Ben Swartzlander, Sandeep P S, Saad Ali
Oops, yep. The default is delete and hence change it to Retain.

Hemant Kumar

unread,
Aug 5, 2020, 2:37:15 PM8/5/20
to Michelle Au, apurv barve, container-storage-interface-community, Ben Swartzlander, Sandeep P S, Saad Ali
Since this comes up pretty often. I opened a doc PR to address this -
https://github.com/kubernetes/website/pull/22979

apurv barve

unread,
Aug 6, 2020, 9:14:25 AM8/6/20
to Hemant Kumar, Michelle Au, container-storage-interface-community, Ben Swartzlander, Sandeep P S, Saad Ali
Thanks. This helps. 
Reply all
Reply to author
Forward
0 new messages