diff --git a/core/runtime/v2/shim.go b/core/runtime/v2/shim.go index ba823b65b256e..3909de66c0f29 100644 --- a/core/runtime/v2/shim.go +++ b/core/runtime/v2/shim.go @@ -34,7 +34,6 @@ import ( "google.golang.org/grpc/connectivity" "google.golang.org/grpc/credentials/insecure" - crmetadata "github.com/checkpoint-restore/checkpointctl/lib" eventstypes "github.com/containerd/containerd/api/events" bootapi "github.com/containerd/containerd/api/runtime/bootstrap/v1" task "github.com/containerd/containerd/api/runtime/task/v3" @@ -64,6 +63,11 @@ const ( loadTimeout = "io.containerd.timeout.shim.load" cleanupTimeout = "io.containerd.timeout.shim.cleanup" shutdownTimeout = "io.containerd.timeout.shim.shutdown" + + // rootFsDiffTar is the name of the rootfs diff archive written next to a + // checkpoint. It is part of the checkpoint layout produced by CRIU tooling, + // so it must stay in sync with github.com/checkpoint-restore/checkpointctl/lib.RootFsDiffTar. + rootFsDiffTar = "rootfs-diff.tar" ) func init() { @@ -642,7 +646,7 @@ func (s *shimTask) Create(ctx context.Context, opts runtime.CreateOpts) (runtime if opts.RestoreFromPath { // Unpack rootfs-diff.tar if it exists. // This needs to happen between the 'Create()' from above and before the 'Start()' from below. - rootfsDiff := filepath.Join(opts.Checkpoint, "..", crmetadata.RootFsDiffTar) + rootfsDiff := filepath.Join(opts.Checkpoint, "..", rootFsDiffTar) _, err = os.Stat(rootfsDiff) if err == nil {