Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions core/runtime/v2/shim.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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() {
Expand Down Expand Up @@ -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 {
Expand Down
Loading