Skip to content

Commit

Permalink
separate healthcheck and container log paths
Browse files Browse the repository at this point in the history
instead of using the container log path to derive where to put the healthchecks, we now put them into the rundir to avoid collision of health check log files when the log path is set by user.

Fixes: #5915

Signed-off-by: Brent Baude <[email protected]>
  • Loading branch information
baude committed Apr 27, 2020
1 parent ca15a83 commit 4a5fd6c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libpod/healthcheck.go
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ func (c *Container) updateHealthCheckLog(hcl define.HealthCheckLog, inStartPerio

// HealthCheckLogPath returns the path for where the health check log is
func (c *Container) healthCheckLogPath() string {
return filepath.Join(filepath.Dir(c.LogPath()), "healthcheck.log")
return filepath.Join(filepath.Dir(c.state.RunDir), "healthcheck.log")
}

// GetHealthCheckLog returns HealthCheck results by reading the container's
Expand Down

0 comments on commit 4a5fd6c

Please sign in to comment.