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

Changed default value of the startInterval to 5s #47799

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 5 additions & 1 deletion daemon/health.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ const (
// the container unstable. Defaults to none.
defaultStartPeriod = 0 * time.Second

// defaultStartInterval is the default interval between health checks during
// the start period.
defaultStartInterval = 5 * time.Second

// Default number of consecutive failures of the health check
// for the container to be considered unhealthy.
defaultProbeRetries = 3
Expand Down Expand Up @@ -251,7 +255,7 @@ func handleProbeResult(d *Daemon, c *container.Container, result *types.Healthch
// There is never more than one monitor thread running per container at a time.
func monitor(d *Daemon, c *container.Container, stop chan struct{}, probe probe) {
probeInterval := timeoutWithDefault(c.Config.Healthcheck.Interval, defaultProbeInterval)
startInterval := timeoutWithDefault(c.Config.Healthcheck.StartInterval, probeInterval)
startInterval := timeoutWithDefault(c.Config.Healthcheck.StartInterval, defaultStartInterval)
startPeriod := timeoutWithDefault(c.Config.Healthcheck.StartPeriod, defaultStartPeriod)

c.Lock()
Expand Down