#dagger hangs for a long time if I stop current engine image

1 messages · Page 1 of 1 (latest)

light galleon
#

This is a potential bug.

if I docker stop the dagger engine image and re-run dagger run it hangs for a long time (maybe 5-10 mins) and exits with this message. I am observing the same behavior when just running go run too.

new client: buildkit failed to respond: failed to list workers: Canceled: context canceled

Is this intended?

hazy thicket
#

yes, I think this is expected since the engine container is expected to always be running. That's why it was the --restart=always flag when we launch it. I don't recall the engine checking that the container is actually running.

#

https://github.com/marcosnils/dagger/blob/f26a84533857596615d5eb2f94f76504ea3af3ff/internal/engine/docker.go#L83-L107

this part of the code tries to always docker run the engine container. If the container has been manually stopped (there's no other way where it could enter into a "stopped" state), it won't realized about it and it'll assume that it started

GitHub

A programmable CI/CD engine that runs your pipelines in containers - dagger/internal/engine/docker.go at f26a84533857596615d5eb2f94f76504ea3af3ff · marcosnils/dagger

light galleon
#

Hmm, so what's the recommended way to start with a clean slate while testing? remove the image itself and let dagger re-download?

hazy thicket
#

you can just remote the container with it's volumes

#

docker rm -fv $container_id

#

take into account that it'll remove the engine cache as well so everything will have to be re-pulled