nextflow-io / nf-nomad

Hashicorp Nomad executor plugin for Nextflow
https://nextflow-io.github.io/nf-nomad/
Apache License 2.0
2 stars 4 forks source link

Unable to mount read only csi volumes #60

Closed jhaezebr closed 4 months ago

jhaezebr commented 4 months ago

When adding csi volumes to nf-nomad, the chosen access mode is alway 'multi-node-multi-writer'. For read-only shares, this should be 'multi-node-reader-only'. Would it be possible to add a toggle to the specification to allow read-only volumes?

Current volume specification in nf-nomad job ``` "Volumes": { "vol_0": { "Name": "", "Type": "csi", "Source": "nf_scratch_volume", "ReadOnly": false, "AccessMode": "multi-node-multi-writer", "AttachmentMode": "file-system", "MountOptions": null, "PerAlloc": false }, "vol_1": { "Name": "", "Type": "csi", "Source": "nf_reference_volume", "ReadOnly": false, "AccessMode": "multi-node-multi-writer", "AttachmentMode": "file-system", "MountOptions": null, "PerAlloc": false } } ```

Proposed toggle idea in config:

nomad { jobs { volumes = [ { type "csi" name "nf_scratch_volume" path "/scratch" }, { type "csi" name "nf_reference_volume" path "/references" readonly true } ] } }