democratic-csi: zfs-local-dataset does not correct paths for chroot
I’m using the zfs-local-dataset driver on Nomad (following some of the instructions in #164), but when trying to spin up a job, it immediately fails with the error:
# can safely ignore this line
/usr/local/bin/mount: illegal option -- o
filesystem 'tank/nomad/data/postgresql_db_volume' cannot be mounted at '/csi/staging/postgresql/rw-file-system-single-node-writer' due to canonicalization error: No such file or directory
I dug into this some more, and found that this is an issue with the plugin, due to this line: https://github.com/democratic-csi/democratic-csi/blob/19197f9515da57f569c670d14fefb1bfd4e43460/docker/mount#L32
Nomad seems to be following spec here, as the staging_target_path passed is a valid path within the container, but democratic-csi proceeds to evaluate that path outside of the container, in the context of the host (the directory in the container is /csi/staging/postgresql/rw-file-system-single-node-writer, but the directory in the host is /var/lib/nomad/client/csi/monolith/org.democratic-csi.zfs-dataset/staging/postgresql/rw-file-system-single-node-writer)
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 15 (9 by maintainers)
Sorry about the huge delay there, I tore down my Nomad cluster and forgot to test this. I just set it back up, and it seems to work fine with
USE_HOST_MOUNT_TOOLS=0with this job configuration:The bind mount to
/hostis still necessary, but otherwise it seems to work great.Sorry - I haven’t been able to make the time to test this change out yet. I’ll give it a run today and see how it is.