csi-driver icon indicating copy to clipboard operation
csi-driver copied to clipboard

Error attaching/detaching volumes after the upgrade from 1.6 to 2.3.2

Open d3473r opened this issue 1 year ago • 5 comments

Hello,

i did an upgrade from kubernetes 1.20 to 1.24 and the respective upgrade of the csi driver from 1.6.0 to 2.3.2 following the instructions from here: https://github.com/hetznercloud/csi-driver/blob/main/docs/kubernetes/README.md#from-v1-to-v2

The upgrade went smooth, all commands executed successfully, the fix-volumeattachments.sh script patched all volume attachments.

But if i scale down a deployment to 0 with an attached volume, the volume is no longer detached from the node. I can detach it manually via the console.hetzner.cloud ui. The same error is happening when starting a deployment, the volume is not getting attached to the node and the pod is failing to start with: MountVolume.SetUp failed for volume "pvc-xxx" : rpc error: code = Internal desc = failed to publish volume: exit status 1 mke2fs 1.46.6 (1-Feb-2023) /dev/disk/by-id/scsi-0HC_Volume_123 is mounted; will not make a filesystem here!

This workaround fixes the error: https://github.com/hetznercloud/csi-driver/issues/278#issuecomment-1273883892 But only once, if the pod is stopped and started again the same error is occuring

Did i miss some migrations steps to upgrade from 1.6.0 to 2.3.2?

Regards

d3473r avatar Jun 30 '23 11:06 d3473r

same here

Privatecoder avatar Jul 09 '23 12:07 Privatecoder

I just upgraded my k3s cluster from v1.25.9 to v1.26.7 and during rotation of storage nodes (running rook ceph) the OSDs couldn't launch because the PVC was not unmounted properly (even after 10+ minutes).

The workaround with deleting the volumeattachment seems to fix this issue…

Update: Rotation of other nodes somehow worked without manual intervention, so this is not easy to reproduce.

toabi avatar Aug 22 '23 13:08 toabi

This issue has been marked as stale because it has not had recent activity. The bot will close the issue if no further action occurs.

github-actions[bot] avatar Nov 21 '23 12:11 github-actions[bot]

This issue has been marked as stale because it has not had recent activity. The bot will close the issue if no further action occurs.

github-actions[bot] avatar Mar 22 '24 12:03 github-actions[bot]

This issue has been marked as stale because it has not had recent activity. The bot will close the issue if no further action occurs.

github-actions[bot] avatar Jun 25 '24 12:06 github-actions[bot]