loft-sh / devpod

Codespaces but open-source, client-only and unopinionated: Works with any IDE and lets you use any cloud, kubernetes or just localhost docker.
https://devpod.sh
Mozilla Public License 2.0
8.42k stars 305 forks source link

Docker Credentials Helper Fails after a few hours #1118

Open mudged opened 2 weeks ago

mudged commented 2 weeks ago

What happened?
After a few hours of the DevContainer being up, calls to docker-credentials-devpod return Error retrieving list credentials: Post "http://localhost:12049/docker-credentials": dial tcp 127.0.0.1:12049: connect: connection refused

This was initially working as expected. The same behaviour has been observed on different DevContainers and the same one (after restart)

What did you expect to happen instead?
Docker credential helper is still able to retrieve credentials

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

Start DevContainer using DevPod (ssh provider, IntelliJ IDE, Windows 11 host, multipass Ubuntu VM).

Leave active for 1/2 hours and then run docker-credentials-devpod list.

Local Environment:

DevPod Provider:

Anything else we need to know?
Inject docker credentials selected on provider

pascalbreuninger commented 2 weeks ago

@mudged thanks for reporting the issue, we'll look into it. Just to confirm, there's no output if you run ps -aux | grep credentials-server but a file lock in $TMPDIR/devpod-credentials.lock?

mudged commented 2 weeks ago

The process is no longer alive (only grep is shown)

$ docker-credential-devpod list
Error retrieving list credentials: Post "http://localhost:12049/docker-credentials": dial tcp 127.0.0.1:12049: connect: connection refused
$ ps -aux | grep credentials-server
mtx       111666  0.0  0.0   3324  1556 pts/0    S+   15:13   0:00 grep credentials-server

No lock file

$ cat $TMPDIR/devpod-credentials.lock
cat: /devpod-credentials.lock: No such file or directory
mudged commented 2 weeks ago

If I restart the DevContainer, I see the process but no lock file

$ ps -aux | grep credentials-server
root        1040  0.0  0.1 1296652 51596 ?       Sl   15:28   0:00 /usr/local/bin/devpod agent container credentials-server --user mtx --configure-git-helper --configure-docker-helper
mtx        13558  0.0  0.0   3324  1660 pts/0    S+   15:30   0:00 grep credentials-server
$ cat $TMPDIR/devpod-credentials.lock
cat: /devpod-credentials.lock: No such file or directory