diff --git a/checkpoint.go b/checkpoint.go index bf773a9ba08..4990f12b1d9 100644 --- a/checkpoint.go +++ b/checkpoint.go @@ -10,7 +10,7 @@ import ( "path/filepath" "strconv" - criu "github.com/checkpoint-restore/go-criu/v5/rpc" + criurpc "github.com/checkpoint-restore/go-criu/v5/rpc" "github.com/opencontainers/runc/libcontainer" "github.com/opencontainers/runc/libcontainer/userns" "github.com/opencontainers/runtime-spec/specs-go" @@ -135,11 +135,11 @@ func setManageCgroupsMode(context *cli.Context, options *libcontainer.CriuOpts) if cgOpt := context.String("manage-cgroups-mode"); cgOpt != "" { switch cgOpt { case "soft": - options.ManageCgroupsMode = criu.CriuCgMode_SOFT + options.ManageCgroupsMode = criurpc.CriuCgMode_SOFT case "full": - options.ManageCgroupsMode = criu.CriuCgMode_FULL + options.ManageCgroupsMode = criurpc.CriuCgMode_FULL case "strict": - options.ManageCgroupsMode = criu.CriuCgMode_STRICT + options.ManageCgroupsMode = criurpc.CriuCgMode_STRICT default: fatal(errors.New("Invalid manage cgroups mode")) } diff --git a/libcontainer/criu_opts_linux.go b/libcontainer/criu_opts_linux.go index 001c5399c72..9323c1f0c10 100644 --- a/libcontainer/criu_opts_linux.go +++ b/libcontainer/criu_opts_linux.go @@ -1,6 +1,6 @@ package libcontainer -import criu "github.com/checkpoint-restore/go-criu/v5/rpc" +import criurpc "github.com/checkpoint-restore/go-criu/v5/rpc" type CriuPageServerInfo struct { Address string // IP address of CRIU page server @@ -24,7 +24,7 @@ type CriuOpts struct { PreDump bool // call criu predump to perform iterative checkpoint PageServer CriuPageServerInfo // allow to dump to criu page server VethPairs []VethPairName // pass the veth to criu when restore - ManageCgroupsMode criu.CriuCgMode // dump or restore cgroup mode + ManageCgroupsMode criurpc.CriuCgMode // dump or restore cgroup mode EmptyNs uint32 // don't c/r properties for namespace from this mask AutoDedup bool // auto deduplication for incremental dumps LazyPages bool // restore memory pages lazily using userfaultfd