From 2aa381f2d0cdc8abb28aa8759c681198cb1e47a7 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 10 Jan 2021 18:12:12 +0800 Subject: add pre checkpoint Signed-off-by: Zhuohan Chen --- pkg/domain/entities/containers.go | 3 +++ pkg/domain/infra/abi/containers.go | 3 +++ 2 files changed, 6 insertions(+) (limited to 'pkg') diff --git a/pkg/domain/entities/containers.go b/pkg/domain/entities/containers.go index a67ecebd5..96687b1de 100644 --- a/pkg/domain/entities/containers.go +++ b/pkg/domain/entities/containers.go @@ -178,6 +178,8 @@ type CheckpointOptions struct { Latest bool LeaveRunning bool TCPEstablished bool + PreCheckPoint bool + WithPrevious bool } type CheckpointReport struct { @@ -196,6 +198,7 @@ type RestoreOptions struct { Latest bool Name string TCPEstablished bool + ImportPrevious string } type RestoreReport struct { diff --git a/pkg/domain/infra/abi/containers.go b/pkg/domain/infra/abi/containers.go index f7a538934..2c79b6187 100644 --- a/pkg/domain/infra/abi/containers.go +++ b/pkg/domain/infra/abi/containers.go @@ -489,6 +489,8 @@ func (ic *ContainerEngine) ContainerCheckpoint(ctx context.Context, namesOrIds [ IgnoreRootfs: options.IgnoreRootFS, IgnoreVolumes: options.IgnoreVolumes, KeepRunning: options.LeaveRunning, + PreCheckPoint: options.PreCheckPoint, + WithPrevious: options.WithPrevious, } if options.All { @@ -529,6 +531,7 @@ func (ic *ContainerEngine) ContainerRestore(ctx context.Context, namesOrIds []st IgnoreVolumes: options.IgnoreVolumes, IgnoreStaticIP: options.IgnoreStaticIP, IgnoreStaticMAC: options.IgnoreStaticMAC, + ImportPrevious: options.ImportPrevious, } filterFuncs := []libpod.ContainerFilter{ -- cgit v1.2.3-54-g00ecf