Skip to content

Commit

Permalink
Don't include ctr.log if not using file logging
Browse files Browse the repository at this point in the history
Checkpoint is blowing up when you use --log-driver=none

[NO NEW TESTS NEEDED] No way currently to test checkpoint restore.

Fixes: containers#11974

Signed-off-by: Daniel J Walsh <[email protected]>
  • Loading branch information
rhatdan committed Oct 14, 2021
1 parent 8d44c54 commit f9ff052
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion libpod/container_internal_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit f9ff052

Please sign in to comment.