8000 Add `--initial-retries` for `HEALTHCHECK` by yongtang · Pull Request #26673 · moby/moby · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add --initial-retries for HEALTHCHECK #26673

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

Closed
wants to merge 1 commit into from

Conversation

yongtang
Copy link
Member

- What I did

This fix tries to address the issue raised in #26664 where it was not possible to have a grace period at the startup of the container.

- How I did it

This fix adds --initial-retries for HEALTHCHECK so that container startup and normal running might have different grace period (retries).

- How to verify it

This fix adds an integration test to cover the changes.

- Description for the changelog

Add --initial-retries for HEALTHCHECK, so that it is possible to specify an initial grace period that is different from the normal grace period (--retries).

- A picture of a cute animal (not mandatory but encouraged)

This fix fixes #26664.

Signed-off-by: Yong Tang yong.tang.github@outlook.com

This fix tries to address the issue raised in 26664 where it was
not possible to have a grace period at the startup of the container.

This fix adds `--initial-retries` for `HEALTHCHECK` so that container
startup and normal running might have different grace period (retries).

This fix adds an integration test to cover the changes.

This fix fixes 26664.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Copy link
@sebglon sebglon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not add initial Timeout rather than initial-retries?

@thaJeztah
Copy link
Member

We discussed this in the maintainers meeting, and while we think the health checks may need improvement, we are not sure about the right approach (yet). We prefer to wait one release to see what use cases people have, and issues they run into.

For that reason I close this for now

@sylvainmouquet
Copy link
sylvainmouquet commented Jun 12, 2017

Has the option --initial-retries been merged in docker release yet ?
It's not listed in the documentation.

One solution could be to define 2 differents kind of healthchecks :

  • one that would run until the container is healthy for the first time
  • the other that would run after that.
    It would allow us to fine-tune the healthchecks to our needs

@thaJeztah
Copy link
Member

@sylvainmouquet docker 17.05 aded a --health-start-period option, which allows you to specify a grace period for the service to start. This can be used (for example) if a service or container needs an initialisation period the first time it's started.

During this period, health checks still run (so you can monitor them), but they are not "counted" as failures, hence, the service/container is not marked "unhealthy", and not restarted/tasks are not re-created if health check fails. See the pull request that implemented it #28938, and the associated issues (#26498 and #26664) for more information.

@yongtang yongtang deleted the 26664-health-initial-retries branch June 12, 2017 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

No possibility to specify grace period in the Healthcheck for service startup
6 participants
0