Skip to content

--container-mounts with a comma-separated list is silently dropped #1169

Open

Description

@zoroyihan7

What happens

Slurm users are used to giving several bind mounts in one --container-mounts value, separated by commas. In Spur the value is taken as a single mount spec, and when that spec is not valid it is discarded without an error. The job starts and runs, and none of the mounts are there.

Cause

--container-mounts is a plain repeatable Vec<String> with no value delimiter (crates/spur-cli/src/sbatch.rs and srun.rs), so a:a,b:b,c:c reaches the node as one string. In spurd the specs are parsed with .filter_map(|m| parse_mount(m).ok()) (crates/spurd/src/agent_server.rs, both the job launch and build_container_launch). parse_mount (crates/spurd/src/container.rs) splits on : and accepts only 2 or 3 parts, so a list of three or more mounts fails and the whole value is dropped, with no log line and no error to the user. (A list of exactly two mounts happens to have 3 parts: it bind-mounts the first source at a directory literally named /b,/c.)

The documentation lists only the single-spec form, but nothing says a list is unsupported, and the failure is silent. Repeating the flag, one mount per flag, works.

Reproduced on v0.15.0 with four comma-separated mounts; the code on main is the same.

How to reproduce

sbatch --container-image=/path/to/image.sqsh \
       --container-mounts=/data:/data,/scratch:/scratch,/models:/models \
       --wrap 'ls -d /data /scratch /models'

Observed: ls reports all three missing, job state COMPLETED. Repeating the flag works:

sbatch --container-image=/path/to/image.sqsh \
       --container-mounts=/data:/data \
       --container-mounts=/scratch:/scratch \
       --container-mounts=/models:/models \
       --wrap 'ls -d /data /scratch /models'

Expected: either the comma list is split into separate mounts, or submission is rejected with an error naming the bad spec. An invalid mount spec should never be dropped without a message.

Activity

  1. zoroyihan7 commented on Nov 10, 2026

    @zoroyihan7
    ContributorAuthor

    Scope note: besides the comma-separated list, any mount that cannot be parsed or applied (unknown flag, missing source, unsupported option) must fail the step with an error naming the mount, instead of being dropped. Please also support read-only mounts and a tmpfs mount. See the requirement list in #1167.

  2. zoroyihan7 commented on Nov 18, 2026

    @zoroyihan7
    ContributorAuthor

    Friendly ping: this is still reproducible on current main. A comma-separated --container-mounts list is still silently dropped, and an unparsable or unapplicable mount does not fail the step. Pending: (1) accept a comma-separated list, (2) fail the step with an error naming any mount that cannot be parsed or applied, (3) read-only and tmpfs mounts, per the list in #1167. Happy to provide a minimal reproduction or test a fix if that helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions