From 7f8f07014b9f84b2774d97befe3163302ecdc18f Mon Sep 17 00:00:00 2001 From: Brent Baude Date: Mon, 27 Apr 2020 16:03:00 -0500 Subject: [PATCH] separate healthcheck and container log paths 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 --- libpod/healthcheck.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libpod/healthcheck.go b/libpod/healthcheck.go index 68ffc23499..507cc09a82 100644 --- a/libpod/healthcheck.go +++ b/libpod/healthcheck.go @@ -256,7 +256,7 @@ func (c *Container) updateHealthCheckLog(hcl HealthCheckLog, inStartPeriod bool) // 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