πŸ€” Problem

Currently when the daemonset pods for csi rclone restart we cannot recover the mounts until users restart their sessions.

This is a continuation of β€£ where we made it so that we can remount stuff after a restart. However the mounts in sessions still do not work even though on the daemonset pods they function properly.

🍴 Appetite

3 weeks

🎯 Solution

  1. Use both methods in CSI. Currently we use only NotePublishVolume but there is also NodeStageVolume. What is usually done in CSI drivers is that the β€œreal” mounting is done NodeStageVolume and then NotePublishVolume only means making a bind mount between the location where the volume was staged and the location where it is needed in the pod. We think that with this once we recover the mount in the staging location then the publish location will refresh and properly propagate to the session pod. Also this way if more than one pod on the same node uses the same volume then we don’t have to rclone mount the same thing twice - but just once and then just have 2 bind mounts to the same rclone mount.

    We saw this section in the juicefs csi driver (which uses fuse under the hood): https://juicefs.com/docs/csi/guide/configurations/#automatic-mount-point-recovery

    And in the juicefs docs they mention that they see the same error we see when the mount fails to recover. But they explain that with HostToContainer mount propagation and a bind-mount on the node you should be able to recover. We tried to set the HostToContainer mount propagation on our sessions. But this did not help. This is because we do the fuse mount directly in NodePublishVolume and we do not bind mount at all.

  2. [Optional] Escape the FUSE process on the host so that mounts persist during daemonset restarts.

🐰 Rabbit Holes

πŸ” Security Implications

πŸ™…β€β™€οΈ No-gos