Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nomad alloc dir, task dir, and secrets dir are mounted read-only #69

Open
tgross opened this issue Oct 4, 2024 · 0 comments
Open

Nomad alloc dir, task dir, and secrets dir are mounted read-only #69

tgross opened this issue Oct 4, 2024 · 0 comments

Comments

@tgross
Copy link
Member

tgross commented Oct 4, 2024

The Nomad alloc dir, task dir, and secrets dir are mounted via the following qemu arguments:

-fsdev local,security_model=mapped,id=fsdev-fs0,path=/run/nomad/dev/data/alloc/9e4ccafc-f877-15b5-8620-cd2562322c02/alloc,readonly \
-device virtio-9p-pci,id=fs0,fsdev=fsdev-fs0,mount_tag=allocDir,bus=pci.0,addr=0x2 \
-fsdev local,security_model=mapped,id=fsdev-fs1,path=/run/nomad/dev/data/alloc/9e4ccafc-f877-15b5-8620-cd2562322c02/vm/local,readonly \
-device virtio-9p-pci,id=fs1,fsdev=fsdev-fs1,mount_tag=localDir,bus=pci.0,addr=0x3 \
-fsdev local,security_model=mapped,id=fsdev-fs2,path=/run/nomad/dev/data/alloc/9e4ccafc-f877-15b5-8620-cd2562322c02/vm/secrets,readonly \
-device virtio-9p-pci,id=fs2,fsdev=fsdev-fs2,mount_tag=secretsDir,bus=pci.0,addr=0x4

This results in read-only file systems in the VM:

$ touch /secrets/foo.txt
touch: cannot touch '/secrets/foo.txt': Read-only file system
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant