From 4803faf00e754281c9fd13887ac6e38bd5f4da53 Mon Sep 17 00:00:00 2001 From: Ace-Tang Date: Fri, 17 Aug 2018 16:03:21 +0800 Subject: [PATCH] cr: don't restore net namespace by default since runc don't manage net device and their configuration, checkpoint also don't dump net namespace by default, so set 'nsmask = unix.CLONE_NEWNET' by default in restore. Or if user do not pass 'empty-ns network', criu will cost extra time in restore. Signed-off-by: Ace-Tang --- restore.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/restore.go b/restore.go index 724157da234..134fa06fdc9 100644 --- a/restore.go +++ b/restore.go @@ -109,6 +109,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