diff options
author | Daniel J Walsh <dwalsh@redhat.com> | 2021-10-14 14:08:51 -0400 |
---|---|---|
committer | Daniel J Walsh <dwalsh@redhat.com> | 2021-10-14 14:12:15 -0400 |
commit | f9ff0525c5fea21bdf8ed398547f861211249a83 (patch) | |
tree | 2878574f87c6c1cc5b55567894e7810964966a61 /libpod/container_internal_linux.go | |
parent | 8d44c548c085c65cae33398b322eabadb6b237f7 (diff) | |
download | podman-f9ff0525c5fea21bdf8ed398547f861211249a83.tar.gz podman-f9ff0525c5fea21bdf8ed398547f861211249a83.tar.bz2 podman-f9ff0525c5fea21bdf8ed398547f861211249a83.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/container_internal_linux.go')
-rw-r--r-- | libpod/container_internal_linux.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libpod/container_internal_linux.go b/libpod/container_internal_linux.go index f652a3ebb..d8385961f 100644 --- a/libpod/container_internal_linux.go +++ b/libpod/container_internal_linux.go @@ -1008,12 +1008,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 { |