podman/SOURCES/podman-1834346.patch
2021-10-08 15:33:20 +00:00

28 lines
1.2 KiB
Diff

From fadd011a80c62f7a2fb971fac34d7b470c6a60df Mon Sep 17 00:00:00 2001
From: Brent Baude <bbaude@redhat.com>
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 <bbaude@redhat.com>
---
libpod/healthcheck.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libpod/healthcheck.go b/libpod/healthcheck.go
index daddb6561d..aec5fa4e0f 100644
--- libpod-5cc92849f7fc9dd734ca2fd8f3ae8830b9a7eb26/libpod/healthcheck.go
+++ libpod-5cc92849f7fc9dd734ca2fd8f3ae8830b9a7eb26/libpod/healthcheck.go
@@ -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