From c135ff76d2665b48133c6813d0302e12939d4d9e Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Thu, 14 Oct 2021 14:08:51 -0400 Subject: Don't include ctr.log if not using file logging Checkpoint is blowing up when you use --log-driver=none [NO NEW TESTS NEEDED] No way currently to test checkpoint restore. Fixes: https://github.com/containers/podman/issues/11974 Signed-off-by: Daniel J Walsh --- libpod/container_internal_linux.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'libpod') diff --git a/libpod/container_internal_linux.go b/libpod/container_internal_linux.go index 89287efc9..310110679 100644 --- a/libpod/container_internal_linux.go +++ b/libpod/container_internal_linux.go @@ -974,12 +974,15 @@ func (c *Container) exportCheckpoint(options ContainerCheckpointOptions) error { includeFiles := []string{ "artifacts", - "ctr.log", metadata.ConfigDumpFile, metadata.SpecDumpFile, metadata.NetworkStatusFile, } + if c.LogDriver() == define.KubernetesLogging || + c.LogDriver() == define.JSONLogging { + includeFiles = append(includeFiles, "ctr.log") + } if options.PreCheckPoint { includeFiles = append(includeFiles, preCheckpointDir) } else { -- cgit v1.2.3-54-g00ecf