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

fix: ensure /tmp exists to have a consistent dir structure #807

Merged
merged 1 commit into from
Nov 17, 2023

Conversation

89luca89
Copy link
Contributor

Ensure /tmp exists, this will fix issues for creating tmpfiles and tmpdirs in container environments

Fix #805
Resolves ENG-2398

@89luca89 89luca89 requested a review from FabianKramm November 13, 2023 14:33
pkg/ssh/server/ssh.go Show resolved Hide resolved
pkg/ssh/server/ssh.go Outdated Show resolved Hide resolved
Signed-off-by: Luca Di Maio <luca.dimaio1@gmail.com>
@89luca89 89luca89 force-pushed the fix/ensure_tmp_exists branch from edad3be to 5390840 Compare November 14, 2023 14:58
@89luca89 89luca89 requested a review from FabianKramm November 15, 2023 08:00
@FabianKramm FabianKramm merged commit 95bfcfe into loft-sh:main Nov 17, 2023
@mikecarr
Copy link

mikecarr commented Nov 24, 2023

I am still seeing this on both version MacOS M1 Gui and command line using Kubernetes Provider, am I doing something wrong?
image

And I cloned the source and ran:

./hack/rebuild.sh

commit c9a081a (HEAD -> main, origin/main, origin/HEAD)

[devpod-log.log](https://github.com/loft-sh/devpod/files/13461721/devpod-log.log

k8s
Client Version: v1.28.4
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.27.4

@mikecarr
Copy link

Update, vscode-try-python works, when I rub vscode-try-java tries to run on Kubernetes I looked at the pod and I see the error, in container: Devpod-init

cp: can't stat '/workspaces/.dockerless/.': No such file or directory

@crkurz
Copy link

crkurz commented Dec 1, 2023

Thank you for the above fix!
Tried with 0.5.0-10 darwin x86_64 with Rancher Desktop 1.9.1 with Kubernetes v1.27.3 (Intel Mac with MacOS 13.5.2) and it got me past /tmp dir issue, but now failing at:

12:03:27 debug Created logger
12:03:27 debug Received ping from agent
12:03:27 debug Start setting up container...
12:03:27 info Copy /Users/ckurz/.devpod/agent/contexts/default/workspaces/test-local/content into DevContainer /workspaces/test-local
12:03:27 info Copy /var/run/docker.sock into DevContainer /var/run/docker.sock
12:03:27 info dockerless build: rename dir: open /workspaces/.dockerless/.devpod-internal: no such file or directory
12:03:27 debug Connection to SSH Server closed
12:03:27 info Error piping stdin: write |1: file already closed
12:03:27 debug Done setting up container
12:03:27 info Process exited with status 1

Problem seems to be:

12:03:27 info dockerless build: rename dir: open /workspaces/.dockerless/.devpod-internal: no such file or directory

Looks similar to what @mikecarr has raised above.
Is there any config hack which I could try? Or other version recommendations?

Update:
The work-around for me was not to use "Dockerfile". Instead I built my image manually and use "image" instead. With this I was even able to go back to 0.4.2.

@mikecarr
Copy link

mikecarr commented Dec 1, 2023

Thank you!!! The java project worked for me with the v0.5.0-alpha.0 version

12:04:25 info Starting openvscode in background...
12:04:25 info Run 'ssh vscode-remote-try-java.devpod' to ssh into the devcontainer
12:04:25 info Starting vscode in browser mode at http://localhost:10800/?folder=/workspaces/vscode-remote-try-java
12:04:29 done Successfully opened http://localhost:10800/?folder=/workspaces/vscode-remote-try-java
12:04:29 info Successfully started vscode in browser mode. Please keep this terminal open as long as you use VSCode browser version


 ❯ ./devpod-darwin-arm64 version
v0.5.0-alpha.0%

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.

Fatal error when starting workspace
4 participants