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: containers#5915

Signed-off-by: Brent Baude <[email protected]>
  • Loading branch information
baude committed Apr 27, 2020
1 parent f6f7172 commit fadd011
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 fadd011

Please sign in to comment.