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

Error if colon in input/output paths when running with DockerRequirement #1250

Closed
mccalluc opened this issue Feb 11, 2020 · 0 comments · Fixed by #1251
Closed

Error if colon in input/output paths when running with DockerRequirement #1250

mccalluc opened this issue Feb 11, 2020 · 0 comments · Fixed by #1251

Comments

@mccalluc
Copy link
Contributor

Expected Behavior

When run with DockerRequirement, input paths with colons should work.

Actual Behavior

It fails:

INFO [job workflow.cwl] /tmp/4cf898fg$ docker \
   run \
   -i \
   --volume=/tmp/4cf898fg:/HZfoyx:rw \
   --volume=/tmp/e8pu8i7i:/tmp:rw \
   --volume=/home/airflow/repositories/ingest-pipeline/src/ingest-pipeline/airflow/data/temp/trig_
_2020-02-08T22:34:44.290910+00:00/cwl_out/cluster-marker-genes:/var/lib/cwl/stg706d994b-d3e7-49fd-9
9a2-d236a8783326/cluster-marker-genes:ro \
   --workdir=/HZfoyx \
   --read-only=true \
   --user=1008:1008 \
...
docker: Error response from daemon: invalid volume specification: '/home/airflow/repositories/inges
t-pipeline/src/ingest-pipeline/airflow/data/temp/trig__2020-02-08T22:34:44.290910+00:00/cwl_out/clu
ster-marker-genes:/var/lib/cwl/stg706d994b-d3e7-49fd-99a2-d236a8783326/cluster-marker-genes:ro'.

(from hubmapconsortium/airflow-dev#33)

Root Cause

in cwltool/docker.py:

    def append_volume(runtime, source, target, writable=False):
        # type: (List[str], str, str, bool) -> None
        """Add binding arguments to the runtime list."""
        runtime.append(
            "--volume={}:{}:{}".format(
                docker_windows_path_adjust(source), target, "rw" if writable else "ro"
            )
        )

With the --volume, colons have a special meaning. The solution is to use --mount instead.

Next Steps

I'll make a PR to address this.

Workflow Code

(skip for now)

Full Traceback

(skip for now)

Your Environment

(skip for now)

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.

1 participant