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

Trying to lock workspace, seems like another process is running that blocks this workspace. #1304

Open
DanyYanev opened this issue Oct 7, 2024 · 5 comments

Comments

@DanyYanev
Copy link

What happened?

info Trying to lock workspace, seems like another process is running that blocks this workspace. Previously I've deleted the whole workspace but each restart like this takes around 1h to rebuild, for some reason, the image it's built from is not cached.

What did you expect to happen instead?

To have a way of manually releasing the lock.

How can we reproduce the bug? (as minimally and precisely as possible)

Randomly refuses to reconnect after some amount of time.

My devcontainer.json:

{
    "name": "...",
    ...
}

Local Environment:

  • DevPod Version: 0.5.21
  • Operating System: mac
  • ARCH of the OS: ARM64

DevPod Provider:

  • Local/remote provider: ssh

Anything else we need to know?

@bkneis
Copy link
Contributor

bkneis commented Oct 7, 2024

Thanks for reporting your issue @DanyYanev. When this happens can you run ps aux | grep devpod and see if there are any processes still running? For now to delete a lock manually you can rm ~/.devpod/contexts/default/locks/{workspace_name}.lock. I'm not sure why your cache is not working, devpod build under the hood uses docker build ... for the SSH provider, does building docker images locally work with cache?

@DanyYanev
Copy link
Author

Looks like it consistently happens when the machine goes to sleep. Right now when it happens I restart my computer.

Another issue popped up. After this mishap, the devpod is not forwarding SSH keys. Restarting vscode doesn't help. I had to start CLion and write an SSH command, the IDE then asked me if I wanted to forward my SSH credentials from the host, which fixed it. I reopened VSCode and the credentials were forwarded correctly.

@bkneis
Copy link
Contributor

bkneis commented Oct 29, 2024

@DanyYanev hmmm, it sounds like you have an IDE or SSH connection alive in the background somewhere. If the SSH forwarding is not working on the devpod, I would recommend rebuilding the workspace with devpod up --recreate

@DanyYanev
Copy link
Author

I'll try to manually close everything from within the pod, but it correctly forwards the credentials once in a blue moon. I saw many people had a similar issue with the vscode ssh extension, but they claim that's fixed.

How does devpod forward credentials? Is there an agent thats supposed to be running that I can try to manually set $SSH_AUTH_SOCK to? Or is it up to the IDE to forward?

@bkneis
Copy link
Contributor

bkneis commented Oct 29, 2024

@DanyYanev did rebuilding the workspace fix this? The workspace lock will be locked based on the client (local machine) not having open connections, not closing processes in the container itself. Devpod forwards the SSH_AUTH_SOCK from your local machine to the container then uses an SSH server served by the devpod container agent for port forwarding

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants