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

Initial rollout ignores healthcheck #38

Open
mbrodala opened this issue Dec 11, 2024 · 1 comment · May be fixed by #39
Open

Initial rollout ignores healthcheck #38

mbrodala opened this issue Dec 11, 2024 · 1 comment · May be fixed by #39

Comments

@mbrodala
Copy link

mbrodala commented Dec 11, 2024

The very first docker rollout service seems to ignore the healthcheck:

$ docker rollout foo
==> Service 'foo' is not running. Starting the service.
 Network _example_default  Creating
 Network _example_default  Created
 Volume "example_foo-mysql"  Creating
 Volume "example_foo-mysql"  Created
 Container example-foo-mysql-1  Creating
 Container example-foo-mysql-1  Created
 Container example-foo-1  Creating
 Container example-foo-1  Created
 Container example-foo-mysql-1  Starting
 Container example-foo-mysql-1  Started
 Container example-foo-mysql-1  Waiting
 Container example-foo-mysql-1  Healthy
 Container example-foo-1  Starting
 Container example-foo-1  Started

You can see that the foo service depends_on the foo-mysql service to be healthy and waits for that. But the foo service itself is only started, without waiting for it to be healthy. And this indeed leads to the docker rollout command to finish even though the foo service is not yet ready to receive requests. In this case accessing the service (via Traefik in this case) yields a 404 until it becomes healthy eventually.

mbrodala added a commit to mbrodala/docker-rollout that referenced this issue Dec 11, 2024
@mbrodala mbrodala linked a pull request Dec 11, 2024 that will close this issue
@mbrodala
Copy link
Author

Workaround for now:

docker rollout foo
docker compose up --no-deps --no-recreate --wait foo

The rollout starts the service, no matter if it was running or not. The compose ... --wait ensures that execution stops until the service is healthy. The --no-deps and --no-recreate avoid pointless overhead and speed up this step since everything is in place already.

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

Successfully merging a pull request may close this issue.

1 participant