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

Tarantool that was ran in the docker swarm is not accessible for 30 seconds #125

Open
entei-11 opened this issue Nov 24, 2019 · 1 comment

Comments

@entei-11
Copy link

entei-11 commented Nov 24, 2019

I faced an issue that I can't access Tarantool for 30 seconds after I start Tarantool in the docker swarm. After several tests I found out that a forwarded port for the stack is not exposed until the tarantool docker container becomes in the "healthy" state. Also, I found out that transition from the "starting" state to "healthy" takes exactly 30 seconds that I have to wait.

A tarantool docker container that I start directly by using run-command exposes the forwarded port immediately after it runs into the "starting" state. So, I believe that the issue is caused by combination of the long tansition from "starting" to "healthy" states and some specific behaviour of the docker container hosted by the docker swarm.

I wrote scripts to reproduce the issue.

Use run-docker-only.sh to start a tarantool container by docker run. You can see that for 30 seconds it stays in the "starting" state and then goes to the "healthy" state. And all that time you can connect to the tarantool from the outside.

bash run-docker-only.sh

Use run-docker-stack.sh to start a tarantool container into the swarm by docker stack deploy. Here you can see the same state transition that lasts 30 seconds. But the tarantool becomes available from the outside just after the tarantool becomes healthy.

bash run-docker-only.sh

You can find demo in the attached zip tarantool_run_test_30secs.zip or in this repo tarantool-run-30secs-demo

@Totktonada
Copy link
Member

Maybe related to tarantool/tarantool#4592

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

No branches or pull requests

2 participants