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

cant use "Dev Container: Open folder in Containers" due to unsupported UNC path, when i use podman #8157

Closed
cnjn opened this issue Mar 7, 2023 · 11 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug containers Issue in vscode-remote containers verified Verification succeeded
Milestone

Comments

@cnjn
Copy link

cnjn commented Mar 7, 2023

  • Dev Container Version: 0.283.0
  • VSCode Version: 1.76.0
  • Local OS Version: win10 build 19045.2673
  • Remote OS Version:
  • Remote Extension/Connection Type: Containers
  • Logs:
[2023-03-07T09:11:10.756Z] Start: Starting container
[2023-03-07T09:11:10.757Z] Start: Run: podman run --sig-proxy=false -a STDOUT -a STDERR --mount type=bind,source=d:\code\node\school_info_,target=/workspaces/school_info_,consistency=cached --mount type=volume,src=vscode,dst=/vscode --mount type=bind,src=\\wsl.localhost\Ubuntu\mnt\wslg\runtime-dir\wayland-0,dst=/tmp/vscode-wayland-0a15d7c3-c027-45db-8708-76940f7ecb2c.sock -l devcontainer.local_folder=d:\code\node\school_info_ -l devcontainer.config_file=d:\code\node\school_info_\.devcontainer\devcontainer.json --entrypoint /bin/sh -l devcontainer.metadata=[{"id":"ghcr.io/devcontainers/features/common-utils:2"},{"id":"ghcr.io/devcontainers/features/git:1"},{"id":"ghcr.io/devcontainers/features/node:1","customizations":{"vscode":{"extensions":["dbaeumer.vscode-eslint"]}}},{"customizations":{"vscode":{"extensions":["dbaeumer.vscode-eslint"]}},"remoteUser":"node"}] mcr.microsoft.com/devcontainers/javascript-node:0-18 -c echo Container started

[2023-03-07T09:11:11.188Z] Error: getting absolute path of \\wsl.localhost\Ubuntu\mnt\wslg\runtime-dir\wayland-0: unsupported UNC path

[2023-03-07T09:11:11.250Z] Stop (493 ms): Run: podman run --sig-proxy=false -a STDOUT -a STDERR --mount type=bind,source=d:\code\node\school_info_,target=/workspaces/school_info_,consistency=cached --mount type=volume,src=vscode,dst=/vscode --mount type=bind,src=\\wsl.localhost\Ubuntu\mnt\wslg\runtime-dir\wayland-0,dst=/tmp/vscode-wayland-0a15d7c3-c027-45db-8708-76940f7ecb2c.sock -l devcontainer.local_folder=d:\code\node\school_info_ -l devcontainer.config_file=d:\code\node\school_info_\.devcontainer\devcontainer.json --entrypoint /bin/sh -l devcontainer.metadata=[{"id":"ghcr.io/devcontainers/features/common-utils:2"},{"id":"ghcr.io/devcontainers/features/git:1"},{"id":"ghcr.io/devcontainers/features/node:1","customizations":{"vscode":{"extensions":["dbaeumer.vscode-eslint"]}}},{"customizations":{"vscode":{"extensions":["dbaeumer.vscode-eslint"]}},"remoteUser":"node"}] mcr.microsoft.com/devcontainers/javascript-node:0-18 -c echo Container started
[2023-03-07T09:11:11.251Z] Start: Run: podman ps -q -a --filter label=devcontainer.local_folder=d:\code\node\school_info_ --filter label=devcontainer.config_file=d:\code\node\school_info_\.devcontainer\devcontainer.json
[2023-03-07T09:11:11.255Z] Stop (509 ms): Run: podman events --format {{json .}} --filter event=start
[2023-03-07T09:11:11.573Z] Stop

Steps to Reproduce:

  1. use podman instead of docker
  2. open a project
  3. run command "Dev Container: Open folder in containers"
  4. command runs failed

Does this issue occur when you try this locally?: Yes
Does this issue occur when you try this locally and all extensions are disabled?: No

according to the log, dev container will try to mount the wayland-0 of wlsg to container, in which it uses the UNC path but podman dont support that

@cnjn
Copy link
Author

cnjn commented Mar 7, 2023

here is a discuss about UNC path, #7978 (comment)

but unfortunally, This method does not work on my computer

not matter i use wsl2 or windows, dev container cant open the folder in container with podman

@mmalyska
Copy link

mmalyska commented Mar 7, 2023

I have the same problem. When I remove this mount, then podman(docker) works.

@cnjn
Copy link
Author

cnjn commented Mar 7, 2023

@mmalyska

but its added automaticully, i have never added this arg.
and i dont konw how to remove this mount 😢

@github-actions github-actions bot added the containers Issue in vscode-remote containers label Mar 7, 2023
@chrmarti chrmarti added bug Issue identified by VS Code Team member as probable bug podman Dev Container using Podman labels Mar 7, 2023
@chrmarti chrmarti self-assigned this Mar 7, 2023
@chrmarti chrmarti added this to the March 2023 milestone Mar 7, 2023
@chrmarti chrmarti removed the podman Dev Container using Podman label Mar 23, 2023
@chrmarti
Copy link
Contributor

Will add a user setting to turn the automatic mounting off.

@chrmarti chrmarti reopened this Mar 23, 2023
@connor4312 connor4312 added the verified Verification succeeded label Mar 23, 2023
@connor4312
Copy link
Member

Looks like we still need a release for the extension

@connor4312 connor4312 removed the verified Verification succeeded label Mar 23, 2023
@joyceerhl joyceerhl added verified Verification succeeded unreleased and removed verified Verification succeeded labels Mar 23, 2023
@chrmarti
Copy link
Contributor

Available in Dev Containers 0.287.0-pre-release.

@connor4312 connor4312 added the verified Verification succeeded label Mar 24, 2023
@connor4312
Copy link
Member

connor4312 commented Mar 24, 2023

I tried to do this with the new option dev.containers.mountWaylandSocket: false, but got the following error:

[93 ms] Dev Containers 0.287.0 in VS Code 1.77.0-insider (deedbd33f5dc57795e11da7c2a26b5a05a93485b).
[93 ms] Start: Resolving Remote
[132 ms] Setting up container for folder or workspace: \\home\plex\test\nodejs-testing
[133 ms] Start: Run: wsl -l -v
[174 ms] Start: Run: wsl -d Ubuntu -e /bin/sh -c echo ~
[263 ms] Start: Run: wsl -d Ubuntu -e /bin/sh -c cd '/home/connor' && /bin/sh
[270 ms] Start: Run in host: id -un
[305 ms] connor
[306 ms] 
[306 ms] Start: Run in host: cat /etc/passwd
[308 ms] Start: Run in host: echo ~
[309 ms] /home/connor
[309 ms] 
[309 ms] Start: Run in host: test -x '/home/connor/.vscode-remote-containers/bin/deedbd33f5dc57795e11da7c2a26b5a05a93485b/node'
[310 ms] 
[310 ms] 
[310 ms] Start: Run in host: test -f '/home/connor/.vscode-remote-containers/dist/vscode-remote-containers-server-0.287.0.js'
[311 ms] 
[311 ms] 
[313 ms] userEnvProbe: loginInteractiveShell (default)
[314 ms] userEnvProbe: not found in cache
[314 ms] userEnvProbe shell: /bin/bash
[881 ms] userEnvProbe PATHs:
Probe:     '/home/connor/.cargo/bin:/home/connor/.nvm/versions/node/v16.14.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/wsl/lib:/mnt/c/Program Files/Amazon Corretto/jdk17.0.4_9/bin:/mnt/c/Windows/system32:/mnt/c/Windows:/mnt/c/Windows/System32/Wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0/:/mnt/c/Windows/System32/OpenSSH/:/mnt/c/Users/conno/AppData/Roaming/nvm:/mnt/c/Program Files/nodejs:/mnt/c/Program Files/Git/cmd:/mnt/c/Program Files/Microsoft SQL Server/150/Tools/Binn/:/mnt/c/Program Files/Microsoft SQL Server/Client SDK/ODBC/170/Tools/Binn/:/mnt/c/Program Files/dotnet/:/mnt/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common:/mnt/c/Program Files (x86)/GnuPG/bin:/mnt/c/ProgramData/chocolatey/bin:/mnt/c/Program Files/Kubernetes/Minikube:/mnt/c/Program Files/Microsoft VS Code/bin:/mnt/c/Users/conno/.cargo/bin:/mnt/c/Users/conno/AppData/Local/Microsoft/WindowsApps:/mnt/c/Users/conno/AppData/Local/Programs/Microsoft VS Code Insiders/bin:/mnt/c/Users/conno/.dotnet/tools:/mnt/c/ProgramData/Anaconda3:/mnt/c/Program Files/Docker/Docker/resources/bin:/mnt/c/ProgramData/DockerDesktop/version-bin:/mnt/c/Strawberry/c/bin:/mnt/c/Strawberry/perl/site/bin:/mnt/c/Strawberry/perl/bin:/mnt/c/WINDOWS/system32:/mnt/c/WINDOWS:/mnt/c/WINDOWS/System32/Wbem:/mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/:/mnt/c/WINDOWS/System32/OpenSSH/:/mnt/c/Program Files/PowerShell/7/:/mnt/c/Program Files/RedHat/Podman/:/mnt/c/Users/conno/anaconda3:/mnt/c/Users/conno/anaconda3/Library/mingw-w64/bin:/mnt/c/Users/conno/anaconda3/Library/usr/bin:/mnt/c/Users/conno/anaconda3/Library/bin:/mnt/c/Users/conno/anaconda3/Scripts:/mnt/c/ProgramData/Anaconda3:/mnt/c/Users/conno/.vscode-server-launcher/bin:/mnt/c/Users/conno/AppData/Local/Programs/Microsoft VS Code Insiders/bin:/mnt/c/Users/conno/.deno/bin:/mnt/c/vcpkg:/mnt/c/Strawberry/perl/bin/:/mnt/c/Users/conno/AppData/Local/Microsoft/WindowsApps:/mnt/c/Users/conno/.dotnet/tools:/mnt/c/Users/conno/AppData/Local/Programs/Fiddler:/snap/bin'
Container: None
[883 ms] Start: Check Docker is running
[883 ms] Start: Run: podman version --format {{.Server.APIVersion}}
[1255 ms] Server API version: 4.4.1
[1256 ms] Start: Run: podman volume ls -q
[1601 ms] Start: Run: podman ps -q -a --filter label=vsch.local.folder=\\home\plex\test\nodejs-testing --filter label=vsch.quality=insider
[1856 ms] Start: Run: podman ps -q -a --filter label=devcontainer.local_folder=\\home\plex\test\nodejs-testing --filter label=devcontainer.config_file=\\home\plex\test\nodejs-testing\.devcontainer\devcontainer.json
[2069 ms] Start: Run: podman ps -q -a --filter label=devcontainer.local_folder=\\home\plex\test\nodejs-testing
[2336 ms] Start: Run: podman ps -q -a --filter label=devcontainer.local_folder=\\home\plex\test\nodejs-testing
[2595 ms] Start: Run: C:\Users\conno\AppData\Local\Programs\Microsoft VS Code Insiders\Code - Insiders.exe --ms-enable-electron-run-as-node c:\Users\conno\.vscode-insiders\extensions\ms-vscode-remote.remote-containers-0.287.0\dist\spec-node\devContainersSpecCLI.js up --user-data-folder c:\Users\conno\AppData\Roaming\Code - Insiders\User\globalStorage\ms-vscode-remote.remote-containers\data --docker-path podman --container-session-data-folder /tmp/devcontainers-3a6d22cf-38cb-4cb6-ad08-8c8461da22f21679675973793 --workspace-folder \\home\plex\test\nodejs-testing --workspace-mount-consistency cached --id-label devcontainer.local_folder=\\home\plex\test\nodejs-testing --id-label devcontainer.config_file=\\home\plex\test\nodejs-testing\.devcontainer\devcontainer.json --log-level debug --log-format json --config \\home\plex\test\nodejs-testing\.devcontainer\devcontainer.json --default-user-env-probe loginInteractiveShell --mount type=volume,source=vscode,target=/vscode,external=true --skip-post-create --update-remote-user-uid-default on --mount-workspace-git-root true --terminal-columns 270 --terminal-rows 16
[2827 ms] @devcontainers/cli 0.35.0. Node.js v16.14.2. win32 10.0.22621 x64.
[2827 ms] Start: Run: podman buildx version
[3094 ms] buildah 1.29.0
[3094 ms] 
[3094 ms] Start: Resolving Remote
[3108 ms] Start: Run: git rev-parse --show-cdup
[3173 ms] Start: Run: podman ps -q -a --filter label=devcontainer.local_folder=\\home\plex\test\nodejs-testing --filter label=devcontainer.config_file=\\home\plex\test\nodejs-testing\.devcontainer\devcontainer.json
[3414 ms] Start: Run: podman inspect --type image mcr.microsoft.com/devcontainers/base:alpine-3.17
[3657 ms] local container features stored at: c:\Users\conno\.vscode-insiders\extensions\ms-vscode-remote.remote-containers-0.287.0\dist\node_modules\vscode-dev-containers\container-features
[3658 ms] Start: Run: tar --no-same-owner -x -f -
[3685 ms] Start: Run: podman events --format {{json .}} --filter event=start
[3706 ms] Start: Starting container
[3706 ms] Start: Run: podman run --sig-proxy=false -a STDOUT -a STDERR --mount type=bind,source=\\home\plex\test\nodejs-testing,target=/workspaces/nodejs-testing,consistency=cached --mount type=volume,src=vscode,dst=/vscode -l devcontainer.local_folder=\\home\plex\test\nodejs-testing -l devcontainer.config_file=\\home\plex\test\nodejs-testing\.devcontainer\devcontainer.json --entrypoint /bin/sh -l devcontainer.metadata=[{"id":"./local-features/git"},{"id":"ghcr.io/devcontainers/features/common-utils:2"},{"remoteUser":"vscode"}] mcr.microsoft.com/devcontainers/base:alpine-3.17 -c echo Container started
Error: getting absolute path of \\home\plex\test\nodejs-testing: unsupported UNC path
[4102 ms] Start: Run: podman ps -q -a --filter label=devcontainer.local_folder=\\home\plex\test\nodejs-testing --filter label=devcontainer.config_file=\\home\plex\test\nodejs-testing\.devcontainer\devcontainer.json
[4355 ms] Error: Command failed: podman run --sig-proxy=false -a STDOUT -a STDERR --mount type=bind,source=\\home\plex\test\nodejs-testing,target=/workspaces/nodejs-testing,consistency=cached --mount type=volume,src=vscode,dst=/vscode -l devcontainer.local_folder=\\home\plex\test\nodejs-testing -l devcontainer.config_file=\\home\plex\test\nodejs-testing\.devcontainer\devcontainer.json --entrypoint /bin/sh -l devcontainer.metadata=[{"id":"./local-features/git"},{"id":"ghcr.io/devcontainers/features/common-utils:2"},{"remoteUser":"vscode"}] mcr.microsoft.com/devcontainers/base:alpine-3.17 -c echo Container started
[4355 ms] trap "exit 0" 15
[4355 ms] exec "$@"
[4355 ms] while sleep 1 & wait $!; do :; done -
[4355 ms]     at bse (c:\Users\conno\.vscode-insiders\extensions\ms-vscode-remote.remote-containers-0.287.0\dist\spec-node\devContainersSpecCLI.js:1916:3264)
[4355 ms]     at J7 (c:\Users\conno\.vscode-insiders\extensions\ms-vscode-remote.remote-containers-0.287.0\dist\spec-node\devContainersSpecCLI.js:1916:3200)
[4355 ms]     at process.processTicksAndRejections (node:internal/process/task_queues:96:5)
[4355 ms]     at async $se (c:\Users\conno\.vscode-insiders\extensions\ms-vscode-remote.remote-containers-0.287.0\dist\spec-node\devContainersSpecCLI.js:1931:2626)
[4356 ms]     at async Ah (c:\Users\conno\.vscode-insiders\extensions\ms-vscode-remote.remote-containers-0.287.0\dist\spec-node\devContainersSpecCLI.js:1931:3741)
[4356 ms]     at async aae (c:\Users\conno\.vscode-insiders\extensions\ms-vscode-remote.remote-containers-0.287.0\dist\spec-node\devContainersSpecCLI.js:2059:17376)
[4356 ms]     at async oae (c:\Users\conno\.vscode-insiders\extensions\ms-vscode-remote.remote-containers-0.287.0\dist\spec-node\devContainersSpecCLI.js:2059:17117)
[4365 ms] Exit code 1
[4367 ms] Command failed: C:\Users\conno\AppData\Local\Programs\Microsoft VS Code Insiders\Code - Insiders.exe --ms-enable-electron-run-as-node c:\Users\conno\.vscode-insiders\extensions\ms-vscode-remote.remote-containers-0.287.0\dist\spec-node\devContainersSpecCLI.js up --user-data-folder c:\Users\conno\AppData\Roaming\Code - Insiders\User\globalStorage\ms-vscode-remote.remote-containers\data --docker-path podman --container-session-data-folder /tmp/devcontainers-3a6d22cf-38cb-4cb6-ad08-8c8461da22f21679675973793 --workspace-folder \\home\plex\test\nodejs-testing --workspace-mount-consistency cached --id-label devcontainer.local_folder=\\home\plex\test\nodejs-testing --id-label devcontainer.config_file=\\home\plex\test\nodejs-testing\.devcontainer\devcontainer.json --log-level debug --log-format json --config \\home\plex\test\nodejs-testing\.devcontainer\devcontainer.json --default-user-env-probe loginInteractiveShell --mount type=volume,source=vscode,target=/vscode,external=true --skip-post-create --update-remote-user-uid-default on --mount-workspace-git-root true --terminal-columns 270 --terminal-rows 16
[4367 ms] Exit code 1

@connor4312 connor4312 reopened this Mar 24, 2023
@TylerLeonhardt TylerLeonhardt added verification-found Issue verification failed and removed verified Verification succeeded labels Mar 24, 2023
@chrmarti
Copy link
Contributor

The podman run command shows no mount option for the Wayland socket, so the setting is applied. The error is about Podman not supporting to mount the UNC path for the workspace folder. This seems to be an issue with the Podman setup, please open a new issue if you think this is a problem with the Dev Containers extension.

Closing again for verification as this is a different problem. Thanks.

@chrmarti chrmarti removed the verification-found Issue verification failed label Mar 27, 2023
@connor4312
Copy link
Member

connor4312 commented Mar 27, 2023

I can run the same podman containers elsewhere (barring the minor bug I linked above), just not in the UNC path. I'll open a new issue for that.

Untagging so someone else can try verifying

@chrmarti
Copy link
Contributor

@connor4312 The issue here is with a workspace folder at a non-UNC path. Podman fails on the automatically added mount point for the Wayland socket which is only added when WAYLAND_DISPLAY is set in WSL. The setting is to turn the automatic mount point off completely. If I understand you correctly, you have everything working, you just need to use a non-UNC workspace folder. Could you give it another try? Thanks!

@connor4312
Copy link
Member

Ahh, gotcha! That works. Sorry I misunderstood.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug containers Issue in vscode-remote containers verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

6 participants