summaryrefslogtreecommitdiff
path: root/libpod/container_internal.go
diff options
context:
space:
mode:
authorAdrian Reber <areber@redhat.com>2021-06-10 12:27:09 +0000
committerMatthew Heon <mheon@redhat.com>2021-06-11 11:06:56 -0400
commitc85b6b3fe1b17716492d0fd6f2e13331a6ed8890 (patch)
tree023e4f1723ef0301886232b510813f324e2fcf7e /libpod/container_internal.go
parentb61701acb38d64a3d2622ebb86ad794435e94e54 (diff)
downloadpodman-c85b6b3fe1b17716492d0fd6f2e13331a6ed8890.tar.gz
podman-c85b6b3fe1b17716492d0fd6f2e13331a6ed8890.tar.bz2
podman-c85b6b3fe1b17716492d0fd6f2e13331a6ed8890.zip
Fix pre-checkpointing
Unfortunately --pre-checkpointing never worked as intended and recent changes to runc have shown that it is broken. To create a pre-checkpoint CRIU expects the paths between the pre-checkpoints to be a relative path. If having a previous checkpoint it needs the be referenced like this: --prev-images-dir ../parent Unfortunately Podman was giving runc (and CRIU) an absolute path. Unfortunately, again, until March 2021 CRIU silently ignored if the path was not relative and switch back to normal checkpointing. This has been now fixed in CRIU and runc and running pre-checkpoint with the latest runc fails, because runc already sees that the path is absolute and returns an error. This commit fixes this by giving runc a relative path. This commit also fixes a second pre-checkpointing error which was just recently introduced. So summarizing: pre-checkpointing never worked correctly because CRIU ignored wrong parameters and recent changes broke it even more. Now both errors should be fixed. [NO TESTS NEEDED] Signed-off-by: Adrian Reber <areber@redhat.com> Signed-off-by: Adrian Reber <adrian@lisas.de>
Diffstat (limited to 'libpod/container_internal.go')
-rw-r--r--libpod/container_internal.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/libpod/container_internal.go b/libpod/container_internal.go
index 53b85a466..af7e97471 100644
--- a/libpod/container_internal.go
+++ b/libpod/container_internal.go
@@ -41,6 +41,7 @@ const (
// name of the directory holding the artifacts
artifactsDir = "artifacts"
execDirPermission = 0755
+ preCheckpointDir = "pre-checkpoint"
)
// rootFsSize gets the size of the container's root filesystem
@@ -140,7 +141,7 @@ func (c *Container) CheckpointPath() string {
// PreCheckpointPath returns the path to the directory containing the pre-checkpoint-images
func (c *Container) PreCheckPointPath() string {
- return filepath.Join(c.bundlePath(), "pre-checkpoint")
+ return filepath.Join(c.bundlePath(), preCheckpointDir)
}
// AttachSocketPath retrieves the path of the container's attach socket