<#18209 `Container ... is not running` error if an...
# github-notifications
q
#18209 `Container ... is not running` error if an docker environment container stops while pantsd is running Issue created by huonw Describe the bug If pants starts a particular docker environment, and that environment dies (e.g. the user restarts the docker daemon or kills the container), pantsd seems to jammed up and emits errors about the container not running or not existing. Pantsd has to be killed and restarted. Reproducer: https://gist.github.com/huonw/95a15c5cac3c5fcaf0aee3f8b63f8116
Copy code
git clone <https://gist.github.com/huonw/95a15c5cac3c5fcaf0aee3f8b63f8116>
cd 95a15c5cac3c5fcaf0aee3f8b63f8116
./run.sh
Copy code
# run.sh
#!/bin/bash

pkill -f pantsd

pants version
#> 2.15.0rc4

echo "# $(date +%s)" > x.py
pants package :pex
#> ... Wrote dist/pex.pex

docker stop $(docker ps -aq)

echo "# $(date +%s)" > x.py
pants package :pex
#> ... Failed to create Docker execution in container: DockerResponseServerError { status_code: 409, message: "Container 3be6e437f53c48f195f699ea0193914c68632773765a4b6d9a1d6b8d78190d7e is not running" }

docker rm $(docker ps -aq)

echo "# $(date +%s)" > x.py
pants package :pex
#> ... Failed to create Docker execution in container: DockerResponseServerError { status_code: 404, message: "No such container: 3be6e437f53c48f195f699ea0193914c68632773765a4b6d9a1d6b8d78190d7e" }
Pants version 2.15.0rc4 OS macOS Additional info https://gist.github.com/huonw/95a15c5cac3c5fcaf0aee3f8b63f8116 pantsbuild/pants