aboutsummaryrefslogtreecommitdiff
path: root/pkg/specgen/generate/oci.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-01-17 12:57:20 +0100
committerGitHub <noreply@github.com>2022-01-17 12:57:20 +0100
commit8514ebd1827b12bae8b5d53d8f0e36244d1b3c3a (patch)
treed8ccbe18806a8d03ac1d89754d4f009103803c5e /pkg/specgen/generate/oci.go
parent26cf6c82c82cbf45afe5998e4a881b9f52202a01 (diff)
parent607cb80bf77642c02b80bff56aa4c3e396a91fa0 (diff)
downloadpodman-8514ebd1827b12bae8b5d53d8f0e36244d1b3c3a.tar.gz
podman-8514ebd1827b12bae8b5d53d8f0e36244d1b3c3a.tar.bz2
podman-8514ebd1827b12bae8b5d53d8f0e36244d1b3c3a.zip
Merge pull request #12860 from rhatdan/cgroups
Use CONTAINERS_CONF cgroups flag for remote API.
Diffstat (limited to 'pkg/specgen/generate/oci.go')
-rw-r--r--pkg/specgen/generate/oci.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/pkg/specgen/generate/oci.go b/pkg/specgen/generate/oci.go
index ee3a990fc..f72ffe80c 100644
--- a/pkg/specgen/generate/oci.go
+++ b/pkg/specgen/generate/oci.go
@@ -152,7 +152,7 @@ func canMountSys(isRootless, isNewUserns bool, s *specgen.SpecGenerator) bool {
return true
}
-func getCGroupPermissons(unmask []string) string {
+func getCgroupPermissons(unmask []string) string {
ro := "ro"
rw := "rw"
cgroup := "/sys/fs/cgroup"
@@ -176,7 +176,7 @@ func getCGroupPermissons(unmask []string) string {
// SpecGenToOCI returns the base configuration for the container.
func SpecGenToOCI(ctx context.Context, s *specgen.SpecGenerator, rt *libpod.Runtime, rtc *config.Config, newImage *libimage.Image, mounts []spec.Mount, pod *libpod.Pod, finalCmd []string, compatibleOptions *libpod.InfraInherit) (*spec.Spec, error) {
- cgroupPerm := getCGroupPermissons(s.Unmask)
+ cgroupPerm := getCgroupPermissons(s.Unmask)
g, err := generate.New("linux")
if err != nil {
@@ -357,7 +357,7 @@ func SpecGenToOCI(ctx context.Context, s *specgen.SpecGenerator, rt *libpod.Runt
// set the devices cgroup when not running in a user namespace
if !inUserNS && !s.Privileged {
g.AddLinuxResourcesDevice(false, "", nil, nil, "rwm")
- for _, dev := range s.DeviceCGroupRule {
+ for _, dev := range s.DeviceCgroupRule {
g.AddLinuxResourcesDevice(true, dev.Type, dev.Major, dev.Minor, dev.Access)
}
}