diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-11-05 20:24:13 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-05 20:24:13 +0100 |
commit | 7eda1b08401ad9ab430261f2b2d236eb9a834454 (patch) | |
tree | 85342c71330e985dc92b29c96e6da8b7c52e4f4c /pkg/namespaces/namespaces.go | |
parent | a904e21cf0213185fd115683dc2adc4baeff922a (diff) | |
parent | b8514ca6f39e58c623a34440f20debe9d0e8053f (diff) | |
download | podman-7eda1b08401ad9ab430261f2b2d236eb9a834454.tar.gz podman-7eda1b08401ad9ab430261f2b2d236eb9a834454.tar.bz2 podman-7eda1b08401ad9ab430261f2b2d236eb9a834454.zip |
Merge pull request #4374 from giuseppe/create-cgroupns-by-default-on-cgroupsv2
namespaces: by default create cgroupns on cgroups v2
Diffstat (limited to 'pkg/namespaces/namespaces.go')
-rw-r--r-- | pkg/namespaces/namespaces.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/pkg/namespaces/namespaces.go b/pkg/namespaces/namespaces.go index 9d1033b93..78b55bb2a 100644 --- a/pkg/namespaces/namespaces.go +++ b/pkg/namespaces/namespaces.go @@ -25,6 +25,11 @@ func (n CgroupMode) IsHost() bool { return n == hostType } +// IsDefaultValue indicates whether the cgroup namespace has the default value. +func (n CgroupMode) IsDefaultValue() bool { + return n == "" +} + // IsNS indicates a cgroup namespace passed in by path (ns:<path>) func (n CgroupMode) IsNS() bool { return strings.HasPrefix(string(n), nsType) |