Skip to content
This repository has been archived by the owner on Feb 8, 2023. It is now read-only.

criu: apply two patch to support c/r function #13

Merged
merged 2 commits into from
Aug 30, 2018
Merged
Show file tree
Hide file tree
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
3 changes: 2 additions & 1 deletion checkpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@ var namespaceMapping = map[specs.LinuxNamespaceType]int{
}

func setEmptyNsMask(context *cli.Context, options *libcontainer.CriuOpts) error {
var nsmask int
/* Runc doesn't manage network devices and their configuration */
nsmask := unix.CLONE_NEWNET

for _, ns := range context.StringSlice("empty-ns") {
f, exists := namespaceMapping[specs.LinuxNamespaceType(ns)]
Expand Down
3 changes: 3 additions & 0 deletions restore.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ using the runc checkpoint command.`,
return err
}
options := criuOptions(context)
if err := setEmptyNsMask(context, options); err != nil {
return err
}
status, err := startContainer(context, spec, CT_ACT_RESTORE, options)
if err != nil {
return err
Expand Down