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

failure to bind mount a path with a comma in the name #5959

Closed
sneumann opened this issue Apr 25, 2021 · 3 comments · Fixed by #6008
Closed

failure to bind mount a path with a comma in the name #5959

sneumann opened this issue Apr 25, 2021 · 3 comments · Fixed by #6008
Milestone

Comments

@sneumann
Copy link

Version of Singularity:

$ singularity version
3.5.2+ds1

Expected behavior

I need to bind-mound a directory into the container that has a comma in the name:
singularity run -B "foo,bar:/data" docker://alpine ls /data
Fails with error mount source /.../bar doesn't exist, since only the first part of the path is used.

A similar issue is reported in #5923 with colon in the name.

Actual behavior

## Prepare: 
mkdir "foo" "foo,bar" ; touch "foo/bar" "foo,bar/baz"

## Works:
singularity run -B "foo:/data" docker://alpine ls /data

## Fails:
singularity run -B "foo,bar:/data" docker://alpine ls /data

with error mount source /.../bar doesn't exist. Docs say -B takes a comma-delimited string of bind path specifications, but I couldn't find how to quote the comma in the filename. I tried foo\,bar, 'foo,bar' but no luck. Ideas ?

Steps to reproduce this behavior

See above.

What OS/distro are you running

Ubuntu 18.04.5 LTS

How did you install Singularity

Installed from Debian packages.

@gmkurtzer
Copy link
Contributor

Escaping the comma from the shell would not do the same thing once interpreted by Singularity. It might be possible to add an internal escape, but I'll leave decision that up to @cclerget or @ikaneshiro.

@carterpeel
Copy link
Contributor

Hello,

This is a templated response that is being sent out to all open issues. We are working hard on 'rebuilding' the Singularity community, and a major task on the agenda is finding out what issues are still outstanding.

Please consider the following:

  1. Is this issue a duplicate, or has it been fixed/implemented since being added?
  2. Is the issue still relevant to the current state of Singularity's functionality?
  3. Would you like to continue discussing this issue or feature request?

Thanks,
Carter

@sneumann
Copy link
Author

Hi @carterpeel , I am afraid the answers are no, yes and yes. A proper fix will also be a likely fix for #5923 as well, so more than one bird with that stone. Yours, Steffen

cclerget added a commit to cclerget/singularity that referenced this issue Jun 2, 2021
…ng syntax:

- `singularity shell -B /tmp/comma\\,separated_dir:/data image`
- `singularity shell -B "/tmp/comma\,separated_dir":/data image`
- `singularity shell -B /tmp/colon\\:sep_dir:/data image`
- `singularity shell -B /tmp/"colon\:sep_dir":/data image`

- Fixes apptainer#5923
- Fixes apptainer#5959
cclerget added a commit to cclerget/singularity that referenced this issue Jun 2, 2021
…ng syntax:

- `singularity shell -B /tmp/comma\\,separated_dir:/data image`
- `singularity shell -B "/tmp/comma\,separated_dir":/data image`
- `singularity shell -B /tmp/colon\\:sep_dir:/data image`
- `singularity shell -B /tmp/"colon\:sep_dir":/data image`

- Fixes apptainer#5923
- Fixes apptainer#5959
cclerget added a commit to cclerget/singularity that referenced this issue Jun 2, 2021
…ng syntax:

- `singularity shell -B /tmp/comma\\,separated_dir:/data image`
- `singularity shell -B "/tmp/comma\,separated_dir":/data image`
- `singularity shell -B /tmp/colon\\:sep_dir:/data image`
- `singularity shell -B /tmp/"colon\:sep_dir":/data image`

- Fixes apptainer#5923
- Fixes apptainer#5959
@cclerget cclerget added this to the 3.8.1 milestone Jun 4, 2021
cclerget added a commit to cclerget/singularity that referenced this issue Jun 4, 2021
…ng syntax:

- `singularity shell -B /tmp/comma\\,separated_dir:/data image`
- `singularity shell -B "/tmp/comma\,separated_dir":/data image`
- `singularity shell -B /tmp/colon\\:sep_dir:/data image`
- `singularity shell -B /tmp/"colon\:sep_dir":/data image`

- Fixes apptainer#5923
- Fixes apptainer#5959
cclerget added a commit to cclerget/singularity that referenced this issue Jun 4, 2021
…ng syntax:

- `singularity shell -B /tmp/comma\\,separated_dir:/data image`
- `singularity shell -B "/tmp/comma\,separated_dir":/data image`
- `singularity shell -B /tmp/colon\\:sep_dir:/data image`
- `singularity shell -B /tmp/"colon\:sep_dir":/data image`

- Fixes apptainer#5923
- Fixes apptainer#5959
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

Successfully merging a pull request may close this issue.

4 participants