summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-11-05 18:59:55 +0100
committerGitHub <noreply@github.com>2021-11-05 18:59:55 +0100
commite826158b4b9c4baef41ca872dea5e68e089355d3 (patch)
tree3fff45f85073bfda41adccf6e45a0ffd5fc44b91 /pkg
parent9b3b44903d4d494186bd767d2ea5f3b2c753a7f2 (diff)
parent7f433df7e76716f801c959cad82f4add397d925a (diff)
downloadpodman-e826158b4b9c4baef41ca872dea5e68e089355d3.tar.gz
podman-e826158b4b9c4baef41ca872dea5e68e089355d3.tar.bz2
podman-e826158b4b9c4baef41ca872dea5e68e089355d3.zip
Merge pull request #12183 from Luap99/rootless-netns-cleanup
Fix rootless cni netns cleanup logic and rename to rootless netns
Diffstat (limited to 'pkg')
-rw-r--r--pkg/domain/entities/system.go2
-rw-r--r--pkg/domain/infra/abi/system.go10
2 files changed, 6 insertions, 6 deletions
diff --git a/pkg/domain/entities/system.go b/pkg/domain/entities/system.go
index fe041dec8..49f0c2323 100644
--- a/pkg/domain/entities/system.go
+++ b/pkg/domain/entities/system.go
@@ -100,7 +100,7 @@ type SystemVersionReport struct {
// SystemUnshareOptions describes the options for the unshare command
type SystemUnshareOptions struct {
- RootlessCNI bool
+ RootlessNetNS bool
}
type ComponentVersion struct {
diff --git a/pkg/domain/infra/abi/system.go b/pkg/domain/infra/abi/system.go
index e326f26a8..7da7754f2 100644
--- a/pkg/domain/infra/abi/system.go
+++ b/pkg/domain/infra/abi/system.go
@@ -360,15 +360,15 @@ func (ic *ContainerEngine) Unshare(ctx context.Context, args []string, options e
return cmd.Run()
}
- if options.RootlessCNI {
- rootlesscni, err := ic.Libpod.GetRootlessCNINetNs(true)
+ if options.RootlessNetNS {
+ rootlessNetNS, err := ic.Libpod.GetRootlessNetNs(true)
if err != nil {
return err
}
// make sure to unlock, unshare can run for a long time
- rootlesscni.Lock.Unlock()
- defer rootlesscni.Cleanup(ic.Libpod)
- return rootlesscni.Do(unshare)
+ rootlessNetNS.Lock.Unlock()
+ defer rootlessNetNS.Cleanup(ic.Libpod)
+ return rootlessNetNS.Do(unshare)
}
return unshare()
}