cr: don't dump network devices and their configuration

RunC doesn't manage network devices and their configuration,
so it is impossible to describe external dependencies to restore them
back.

This means that all users have to set --empty-ns network, so let's do
this by default.

Signed-off-by: Andrei Vagin <avagin@openvz.org>
This commit is contained in:
Andrei Vagin 2018-07-10 09:53:34 -07:00
parent 21ac0862f2
commit 8187fb740c
1 changed files with 2 additions and 1 deletions

View File

@ -125,7 +125,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)]