kernelci / kernelci/kernelci-pipeline

Docker-in-Docker runtime failure with invalid volume name

Open
#270 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
11
Forks
40
Avg merge
2d 13h
Merged PRs (30d)
14

Description

As reported in https://github.com/kernelci/kernelci-pipeline/pull/264#issuecomment-1569516026:
```
kernelci-pipeline-runner-docker | Pulling image kernelci/staging-gcc-10:x86-kunit-kernelci
kernelci-pipeline-runner-docker | Starting container
kernelci-pipeline-runner-docker | 05/29/2023 07:20:42 AM UTC [ERROR] Traceback (most recent call last):
kernelci-pipeline-runner-docker | File "/usr/local/lib/python3.10/site-packages/docker/api/client.py", line 261, in _raise_for_status
kernelci-pipeline-runner-docker | response.raise_for_status()
kernelci-pipeline-runner-docker | File "/usr/local/lib/python3.10/site-packages/requests/models.py", line 1021, in raise_for_status
kernelci-pipeline-runner-docker | raise HTTPError(http_error_msg, response=self)
kernelci-pipeline-runner-docker | requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: http+docker://localhost/v1.35/containers/create
kernelci-pipeline-runner-docker |
kernelci-pipeline-runner-docker | During handling of the above exception, another exception occurred:
kernelci-pipeline-runner-docker |
kernelci-pipeline-runner-docker | Traceback (most recent call last):
kernelci-pipeline-runner-docker | File "/home/kernelci/pipeline/base.py", line 69, in run
kernelci-pipeline-runner-docker | status = self._run(context)
kernelci-pipeline-runner-docker | File "/home/kernelci/./pipeline/runner.py", line 94, in _run
kernelci-pipeline-runner-docker | job_obj = self._runtime.submit(output_file)
kernelci-pipeline-runner-docker | File "/usr/local/lib/python3.10/site-packages/kernelci-1.1-py3.10.egg/kernelci/runtime/docker.py", line 69, in submit
kernelci-pipeline-runner-docker | return self._client.containers.run(
kernelci-pipeline-runner-docker | File "/usr/local/lib/python3.10/site-packages/docker/models/containers.py", line 802, in run
kernelci-pipeline-runner-docker | container = self.create(image=image, command=command,
kernelci-pipeline-runner-docker | File "/usr/local/lib/python3.10/site-packages/docker/models/containers.py", line 861, in create
kernelci-pipeline-runner-docker | resp = self.client.api.create_container(**create_kwargs)
kernelci-pipeline-runner-docker | File "/usr/local/lib/python3.10/site-packages/docker/api/container.py", line 430, in create_container
kernelci-pipeline-runner-docker | return self.create_container_from_config(config, name)
kernelci-pipeline-runner-docker | File "/usr/local/lib/python3.10/site-packages/docker/api/container.py", line 441, in create_container_from_config
kernelci-pipeline-runner-docker | return self._result(res, True)
kernelci-pipeline-runner-docker | File "/usr/local/lib/python3.10/site-packages/docker/api/client.py", line 267, in _result
kernelci-pipeline-runner-docker | self._raise_for_status(response)
kernelci-pipeline-runner-docker | File "/usr/local/lib/python3.10/site-packages/docker/api/client.py", line 263, in _raise_for_status
kernelci-pipeline-runner-docker | raise create_api_error_from_http_exception(e)
kernelci-pipeline-runner-docker | File "/usr/local/lib/python3.10/site-packages/docker/errors.py", line 31, in create_api_error_from_http_exception
kernelci-pipeline-runner-docker | raise cls(e, response=response, explanation=explanation)
kernelci-pipeline-runner-docker | docker.errors.APIError: 400 Client Error: Bad Request ("create data/ssh/: "data/ssh/" includes invalid characters for a local volume name, only "[a-zA-Z0-9][a-zA-Z0-9_.-]" are allowed. If you intended to pass a host directory, use absolute path")
kernelci-pipeline-runner-docker |
kernelci-pipeline-runner-docker exited with code 1
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with pipeline/runner.py and the Docker runtime entry at kernelci/runtime/docker.py, then reproduce the container creation failure shown in the report. Check how the data/ssh/ mount is passed to Docker and verify the runtime can submit a job without the invalid-volume error. Done means the reported Docker-in-Docker run completes past container creation.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, python
Domain
devops, infrastructure
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.