Rclone calls Cache.reload on startup, to check if any files from the VFS cache have to be uploaded. Since this talks to the remote, it can take a long time. After the default --daemon-wait setting of one minute, rclone exits and mounting fails. Increasing --daemon-wait leads to a gRPC timeout after 2 minutes, also causing Kubernetes to see the mount as failed, while the rclone process still exists and now never exits, because NodeUnpublishVolume is never called.
Not running with --daemon and managing the child process manually, as seen here might be a good idea (though it requires checking that the mount was successful), but can't really solve this problem, because we still have to finish mounting before the 2 minute gRPC timeout hits us.
It seems to me that the only solution is to start with a fresh cache each time, which brings its own problems, i.e. data loss.
Rclone calls
Cache.reload
on startup, to check if any files from the VFS cache have to be uploaded. Since this talks to the remote, it can take a long time. After the default--daemon-wait
setting of one minute, rclone exits and mounting fails. Increasing--daemon-wait
leads to a gRPC timeout after 2 minutes, also causing Kubernetes to see the mount as failed, while therclone
process still exists and now never exits, becauseNodeUnpublishVolume
is never called.Not running with
--daemon
and managing the child process manually, as seen here might be a good idea (though it requires checking that the mount was successful), but can't really solve this problem, because we still have to finish mounting before the 2 minute gRPC timeout hits us.It seems to me that the only solution is to start with a fresh cache each time, which brings its own problems, i.e. data loss.