diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2022-01-17 12:57:20 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-17 12:57:20 +0100 |
commit | 8514ebd1827b12bae8b5d53d8f0e36244d1b3c3a (patch) | |
tree | d8ccbe18806a8d03ac1d89754d4f009103803c5e /cmd | |
parent | 26cf6c82c82cbf45afe5998e4a881b9f52202a01 (diff) | |
parent | 607cb80bf77642c02b80bff56aa4c3e396a91fa0 (diff) | |
download | podman-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 'cmd')
-rw-r--r-- | cmd/podman/common/create.go | 6 | ||||
-rw-r--r-- | cmd/podman/common/create_opts.go | 4 | ||||
-rw-r--r-- | cmd/podman/containers/create.go | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/cmd/podman/common/create.go b/cmd/podman/common/create.go index e95e447e1..3ce4e6731 100644 --- a/cmd/podman/common/create.go +++ b/cmd/podman/common/create.go @@ -97,7 +97,7 @@ func DefineCreateFlags(cmd *cobra.Command, cf *entities.ContainerCreateOptions, cgroupsFlagName := "cgroups" createFlags.StringVar( - &cf.CGroupsMode, + &cf.CgroupsMode, cgroupsFlagName, cgroupConfig(), `control container cgroup configuration ("enabled"|"disabled"|"no-conmon"|"split")`, ) @@ -159,7 +159,7 @@ func DefineCreateFlags(cmd *cobra.Command, cf *entities.ContainerCreateOptions, deviceCgroupRuleFlagName := "device-cgroup-rule" createFlags.StringSliceVar( - &cf.DeviceCGroupRule, + &cf.DeviceCgroupRule, deviceCgroupRuleFlagName, []string{}, "Add a rule to the cgroup allowed devices list", ) @@ -762,7 +762,7 @@ func DefineCreateFlags(cmd *cobra.Command, cf *entities.ContainerCreateOptions, cgroupParentFlagName := "cgroup-parent" createFlags.StringVar( - &cf.CGroupParent, + &cf.CgroupParent, cgroupParentFlagName, "", "Optional parent cgroup for the container", ) diff --git a/cmd/podman/common/create_opts.go b/cmd/podman/common/create_opts.go index b4641ea96..eb0d07836 100644 --- a/cmd/podman/common/create_opts.go +++ b/cmd/podman/common/create_opts.go @@ -246,7 +246,7 @@ func ContainerCreateToContainerCLIOpts(cc handlers.CreateContainerConfig, rtc *c Authfile: "", CapAdd: append(capAdd, cc.HostConfig.CapAdd...), CapDrop: append(cappDrop, cc.HostConfig.CapDrop...), - CGroupParent: cc.HostConfig.CgroupParent, + CgroupParent: cc.HostConfig.CgroupParent, CIDFile: cc.HostConfig.ContainerIDFile, CPUPeriod: uint64(cc.HostConfig.CPUPeriod), CPUQuota: cc.HostConfig.CPUQuota, @@ -259,7 +259,7 @@ func ContainerCreateToContainerCLIOpts(cc handlers.CreateContainerConfig, rtc *c // Detach: false, // don't need // DetachKeys: "", // don't need Devices: devices, - DeviceCGroupRule: nil, + DeviceCgroupRule: nil, DeviceReadBPs: readBps, DeviceReadIOPs: readIops, DeviceWriteBPs: writeBps, diff --git a/cmd/podman/containers/create.go b/cmd/podman/containers/create.go index 694b97fe5..db78c96ee 100644 --- a/cmd/podman/containers/create.go +++ b/cmd/podman/containers/create.go @@ -257,8 +257,8 @@ func CreateInit(c *cobra.Command, vals entities.ContainerCreateOptions, isInfra } vals.Env = env } - if c.Flag("cgroups").Changed && vals.CGroupsMode == "split" && registry.IsRemote() { - return vals, errors.Errorf("the option --cgroups=%q is not supported in remote mode", vals.CGroupsMode) + if c.Flag("cgroups").Changed && vals.CgroupsMode == "split" && registry.IsRemote() { + return vals, errors.Errorf("the option --cgroups=%q is not supported in remote mode", vals.CgroupsMode) } if c.Flag("pod").Changed && !strings.HasPrefix(c.Flag("pod").Value.String(), "new:") && c.Flag("userns").Changed { |