gluster / gluster-csi-driver

DEPRECATED: Gluster Container Storage Interface (CSI) driver
GNU Lesser General Public License v3.0
57 stars 30 forks source link

Block volume mount fails if no loop devices are present on the host #168

Closed poornimag closed 5 years ago

poornimag commented 5 years ago

When we create a pvc of glustervirtblock storage class, and try to bind mount it in any application container, the attachvolume req fails:

  Normal   SuccessfulAttachVolume  6m41s                  attachdetach-controller  AttachVolume.Attach succeeded for volume "pvc-ad946394-2b8d-11e9-83aa-5254005270e0"
  Warning  FailedMount             13s (x11 over 6m25s)   kubelet, kube2           MountVolume.SetUp failed for volume "pvc-ad946394-2b8d-11e9-83aa-5254005270e0" : rpc error: code = Internal desc = mount failed: exit status 32
Mounting command: mount
Mounting arguments: -t xfs /mnt/blockhostvol/block_hosting_volume_4a7dc70a-77aa-4fad-9c7e-1f91ef4cd25d/pvc-ad946394-2b8d-11e9-83aa-5254005270e0 /var/lib/kubelet/pods/adae0953-2b8d-11e9-83aa-5254005270e0/volumes/kubernetes.io~csi/pvc-ad946394-2b8d-11e9-83aa-5254005270e0/mount
Output: mount: /mnt/blockhostvol/block_hosting_volume_4a7dc70a-77aa-4fad-9c7e-1f91ef4cd25d/pvc-ad946394-2b8d-11e9-83aa-5254005270e0: failed to setup loop device: No such file or directory
  Warning  FailedMount  5s (x3 over 4m39s)  kubelet, kube2  Unable to mount volumes for pod "fs-performance-qrd54_default(adae0953-2b8d-11e9-83aa-5254005270e0)": timeout expired waiting for volumes to attach or mount for pod "default"/"fs-performance-qrd54". list of unmounted volumes=[target]. list of unattached volumes=[target default-token-l4pjc]

Expected behavior The PVC should get attached

Additional context Workaround for this is to mknod loop devices (/dev/loop{0..n}) before nodeplugin tries to mount the block volumes. One of the suggestions is to create an init container in the csi-nodeplugin-glusterblock, that does the required prework.

poornimag commented 5 years ago

This shall be a blocker, will be addressed ASAP.

amarts commented 5 years ago

this is addressed by gluster/gcs#137