d0fe93
From fadd011a80c62f7a2fb971fac34d7b470c6a60df Mon Sep 17 00:00:00 2001
d0fe93
From: Brent Baude <bbaude@redhat.com>
d0fe93
Date: Mon, 27 Apr 2020 16:03:00 -0500
d0fe93
Subject: [PATCH] separate healthcheck and container log paths
d0fe93
d0fe93
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.
d0fe93
d0fe93
Fixes: #5915
d0fe93
d0fe93
Signed-off-by: Brent Baude <bbaude@redhat.com>
d0fe93
---
d0fe93
 libpod/healthcheck.go | 2 +-
d0fe93
 1 file changed, 1 insertion(+), 1 deletion(-)
d0fe93
d0fe93
diff --git a/libpod/healthcheck.go b/libpod/healthcheck.go
d0fe93
index daddb6561d..aec5fa4e0f 100644
d0fe93
--- libpod-5cc92849f7fc9dd734ca2fd8f3ae8830b9a7eb26/libpod/healthcheck.go
d0fe93
+++ libpod-5cc92849f7fc9dd734ca2fd8f3ae8830b9a7eb26/libpod/healthcheck.go
d0fe93
@@ -238,7 +238,7 @@ func (c *Container) updateHealthCheckLog(hcl define.HealthCheckLog, inStartPerio
d0fe93
 
d0fe93
 // HealthCheckLogPath returns the path for where the health check log is
d0fe93
 func (c *Container) healthCheckLogPath() string {
d0fe93
-	return filepath.Join(filepath.Dir(c.LogPath()), "healthcheck.log")
d0fe93
+	return filepath.Join(filepath.Dir(c.state.RunDir), "healthcheck.log")
d0fe93
 }
d0fe93
 
d0fe93
 // GetHealthCheckLog returns HealthCheck results by reading the container's