hashicorp / nomad-driver-podman

A nomad task driver plugin for sandboxing workloads in podman containers
https://developer.hashicorp.com/nomad/plugins/drivers/podman
Mozilla Public License 2.0
224 stars 61 forks source link

tmpfs options are not parsed #290

Open LordAro opened 9 months ago

LordAro commented 9 months ago

According to the docs, I should be able to specify some options when creating a tmpfs mount - https://docs.podman.io/en/latest/markdown/podman-run.1.html#tmpfs-fs

I've specified these in the nomad job file as:

        tmpfs = [
          "/tmp/csi/keys:rw,size=1000k"
        ]

But it seems not to be working, when I podman container inspect directly I get:

...
               "Tmpfs": {
                    "/tmp/csi/keys:rw,size=1000k": "rw,rprivate,nosuid,nodev,tmpcopyup"
               },
...

Which rather suggests that it's mounted a folder named /tmp/csi/keys:rw,size=1000k rather than /tmp/csi/keys

I'm very new to this, so maybe I'm missing something obvious...

lgfa29 commented 7 months ago

Hi @LordAro 👋

Thanks for the report. I think we're missing logic here to split the input string into destination and options. https://github.com/hashicorp/nomad-driver-podman/blob/259a211eec35fb57a89b266aa76a4488f8f1d388/driver.go#L1359-L1365

I will try to to push a fix next week.

Cellivar commented 3 months ago

Just tripped over this myself tonight trying to get the Ceph CSI driver running, looks like the parser is still doing the simple operation here.