Filepath Conversion issue when running podman machine's in WSL2 and volumes/tmpfs #13707
Labels
kind/bug
Categorizes issue or PR as related to a bug.
locked - please file new issue/PR
Assist humans wanting to comment on an old issue or PR with locked comments.
remote
Problem is in podman-remote
windows
issue/bug on Windows
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
On a freshly installed VM using
podman machine init
, I get errors reporting that relative paths are not accepted.Steps to reproduce the issue:
Case 1: Easiest way to reproduce is below.
podman machine init
podman run --tmpfs /tmp hello-world
Case 2: An alternative to --tmpfs is trying to mount any directory from VM to container (not worried about from host yet).
podman machine init
podman run -v /mnt/c/Users/wdixon/tmp/testing:/somelocation hello-world
Describe the results you received:
Case 1:
Error: invalid container path "\\tmp", must be an absolute path
Case 2:
Error: statfs /home/user/C:\mnt\c\Users\wdixon\tmp\testing: no such file or directory
Describe the results you expected:
I would expect the paths in both cases not to have backslashes when on the agent and instead use the forward slash.
I was not expecting my volume for host to be prefixed with
/home/user/C:
either. Not sure if I am missing something in the documentation around how the VMs are setup or not.Additional information you deem important (e.g. issue happens only occasionally):
Sneaky suspicion that Podman remote client is doing a
filepath.Clean
or even afilepath.Join
in the case of the volume case but I don't know enough about the codebase to be able to navigate quickly through to suggest a fix. https://github.com/containers/podman/blob/main/libpod/container_path_resolution.go seemed promising but couldn't find the exact "invalid container path X must be an absolute path" error message there.Case 1: Raw Output
Case 2: Raw Output
Output of
podman version
:Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/main/troubleshooting.md)
Yes
Additional environment details (AWS, VirtualBox, physical, etc.):
Host: Windows 11
VM: WSL2 using
podman machine init
The text was updated successfully, but these errors were encountered: