From cf554d59dd96e459544748290eb9167f4bcde509 Mon Sep 17 00:00:00 2001 From: Ross Boucher Date: Tue, 7 Jun 2016 17:05:22 -0400 Subject: [PATCH] Store the checkpoint and restore logs in the same directory as the (#253) checkpoint image itself. Signed-off-by: Ross Boucher --- containerd-shim/process.go | 3 ++- runtime/container.go | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/containerd-shim/process.go b/containerd-shim/process.go index bf48eac..6de7d9b 100644 --- a/containerd-shim/process.go +++ b/containerd-shim/process.go @@ -132,7 +132,8 @@ func (p *process) start() error { ) } else if p.checkpoint != nil { args = append(args, "restore", - "--image-path", filepath.Join(p.checkpointPath), + "--image-path", p.checkpointPath, + "--work-path", filepath.Join(p.checkpointPath, "criu.work", "restore-"+time.Now().Format(time.RFC3339)), ) add := func(flags ...string) { args = append(args, flags...) diff --git a/runtime/container.go b/runtime/container.go index b395e79..4b9fa9a 100644 --- a/runtime/container.go +++ b/runtime/container.go @@ -351,6 +351,7 @@ func (c *container) Checkpoint(cpt Checkpoint, checkpointDir string) error { args := []string{ "checkpoint", "--image-path", path, + "--work-path", filepath.Join(path, "criu.work"), } add := func(flags ...string) { args = append(args, flags...)