-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
CLI must check if all containers started properly #3655
Comments
So I think algorithm should be like that: for each image from
@benoitf wdyt? |
yeah I've understood the goal |
@riuvshin so I think we only need to check docker compose boot sequence. For now if there is a failure it silently exits |
…ose up command and also check each container of docker-compose services if they’re running or not Change-Id: Ie7ef9cc301c2605ec40db70f00d06f1fca694e4c Signed-off-by: Florent BENOIT <fbenoit@codenvy.com>
…er-compose up command and also check each container of docker-compose services if they’re running or not Change-Id: I91f0298aaaa3c547925989f964a8d2c38f6393d3 Signed-off-by: Florent BENOIT <fbenoit@codenvy.com>
…lt of docker-compose up and containers (eclipse-che#3731) * Fix eclipse-che#3655 : Check docker-compose file validity, result of docker-compose up command and also check each container of docker-compose services if they’re running or not Change-Id: Ie7ef9cc301c2605ec40db70f00d06f1fca694e4c Signed-off-by: Florent BENOIT <fbenoit@codenvy.com> * fixup! Fix eclipse-che#3655 : Check docker-compose file validity, result of docker-compose up command and also check each container of docker-compose services if they’re running or not Change-Id: I91f0298aaaa3c547925989f964a8d2c38f6393d3 Signed-off-by: Florent BENOIT <fbenoit@codenvy.com>
today CLI checks only is api server is available, but sometimes some containers may not start this usually happen due to docker bugs like after docker engine restart some container unable to start and the only way to make it work remove stopped container and restart. There is a lot of other possible scenarios where some container may not start so we must check every single container is it at least running container.
here is command how to do that check with inspect this command return
true
orfalse
docker inspect -f {{.State.Running}} $CONTAINER_ID
so all we neeed to do is to iterate across all codenvy containers and check if all is in running state.
here is a command how to get all existed (even stopped) codenvy containers:
docker ps -qa --filter="name=codenvy_*"
but that approach could be better if we will find a way how to do that check by container name because I think we could have situation where container was not created so we will not have
container id
to check. (Im not sure if that situation is possible)The text was updated successfully, but these errors were encountered: