Skip to content

runtimes: fix path translation when using --device-dict#65

Merged
roxell merged 1 commit into
kernelci:masterfrom
bhcopeland:fix-device-dict-volume
May 19, 2026
Merged

runtimes: fix path translation when using --device-dict#65
roxell merged 1 commit into
kernelci:masterfrom
bhcopeland:fix-device-dict-volume

Conversation

@bhcopeland
Copy link
Copy Markdown
Member

In device-dict mode the bind uses dispatcher_download_dir on both the host and the container. The docker wrapper rewrote mount sources to tmpdir/dispatcher/tmp instead.

This sent the wrong path to the host docker daemon. The bind failed with:

bind source path does not exist: ...

Pass the volume path explicitly to pre_run() so the caller decides which path the docker wrapper should use, based on the mode. This avoids the wrapper rewriting paths that are already host paths in device-dict mode.

Also create the dispatcher_download_dir on the host before binding it.

Reported-by: Anders Roxell anders.roxell@linaro.org

Copy link
Copy Markdown
Collaborator

@roxell roxell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new volume parameter in pre_run() isn't covered by tests, worth adding.

Comment thread tuxrun/runtimes.py Outdated
# Render and bind the docker wrapper
def pre_run(self, tmpdir, volume=None):
if volume is None:
volume = tmpdir / "dispatcher" / "tmp"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can probably create a new base function _resolve_volume(tmpdir, volume) since we have the same here and in podman.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, I missed that. Updated v2 patch

@bhcopeland bhcopeland force-pushed the fix-device-dict-volume branch from 53de8fa to 01845f4 Compare May 19, 2026 08:15
In device-dict mode the bind uses dispatcher_download_dir on both the
host and the container. The docker wrapper rewrote mount sources to
tmpdir/dispatcher/tmp instead.

This sent the wrong path to the host docker daemon. The bind failed
with:

  bind source path does not exist: ...

Pass the volume path explicitly to pre_run() so the caller decides
which path the docker wrapper should use, based on the mode. This
avoids the wrapper rewriting paths that are already host paths in
device-dict mode.

Also create the dispatcher_download_dir on the host before binding it.

Co-developed-by: Anders Roxell <anders.roxell@linaro.org>
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
Signed-off-by: Ben Copeland <ben.copeland@linaro.org>
@bhcopeland bhcopeland force-pushed the fix-device-dict-volume branch from 01845f4 to f4b7a68 Compare May 19, 2026 09:16
@roxell roxell merged commit 67679b4 into kernelci:master May 19, 2026
29 of 30 checks passed
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 this pull request may close these issues.

2 participants