summaryrefslogtreecommitdiff
path: root/libpod
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2021-10-14 14:08:51 -0400
committerMatthew Heon <matthew.heon@pm.me>2021-10-19 15:56:35 -0400
commitc135ff76d2665b48133c6813d0302e12939d4d9e (patch)
treeca8daa7c131e354f7bc3fb6625b6c5c05efe6101 /libpod
parent9168db8bc0b1158389801c2fa53563a4ced3aea5 (diff)
downloadpodman-c135ff76d2665b48133c6813d0302e12939d4d9e.tar.gz
podman-c135ff76d2665b48133c6813d0302e12939d4d9e.tar.bz2
podman-c135ff76d2665b48133c6813d0302e12939d4d9e.zip
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 <dwalsh@redhat.com>
Diffstat (limited to 'libpod')
-rw-r--r--libpod/container_internal_linux.go5
1 files changed, 4 insertions, 1 deletions
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 {