aboutsummaryrefslogtreecommitdiff
path: root/libpod/options.go
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@pm.me>2021-08-11 14:38:02 -0400
committerMatthew Heon <matthew.heon@pm.me>2021-08-11 15:28:18 -0400
commit7442f0b858e5fe2d7922b3b5714030fda5b2646e (patch)
treed54633e92f854dfe9f5e0e0361e46e35c2dcfe7d /libpod/options.go
parent61a5e981276cca57d604108d19bcfa1beae2f271 (diff)
downloadpodman-7442f0b858e5fe2d7922b3b5714030fda5b2646e.tar.gz
podman-7442f0b858e5fe2d7922b3b5714030fda5b2646e.tar.bz2
podman-7442f0b858e5fe2d7922b3b5714030fda5b2646e.zip
Revert "Podman Pod Create --cpus and --cpuset-cpus flags"
This reverts commit bbd085ad1e3cf9c5b543c907ad7014ccf8a5cb34. The cgroup work to enable these has not happened yet and will not be ready in time for the release of Podman 3.3.0. Signed-off-by: Matthew Heon <matthew.heon@pm.me>
Diffstat (limited to 'libpod/options.go')
-rw-r--r--libpod/options.go42
1 files changed, 2 insertions, 40 deletions
diff --git a/libpod/options.go b/libpod/options.go
index 17a36008d..776f5ddd8 100644
--- a/libpod/options.go
+++ b/libpod/options.go
@@ -21,7 +21,6 @@ import (
"github.com/containers/storage"
"github.com/containers/storage/pkg/idtools"
"github.com/cri-o/ocicni/pkg/ocicni"
- "github.com/opencontainers/runtime-spec/specs-go"
"github.com/opencontainers/runtime-tools/generate"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
@@ -574,6 +573,7 @@ func WithMaxLogSize(limit int64) CtrCreateOption {
if ctr.valid {
return define.ErrRuntimeFinalized
}
+
ctr.config.LogSize = limit
return nil
@@ -881,6 +881,7 @@ func WithMountNSFrom(nsCtr *Container) CtrCreateOption {
if err := checkDependencyContainer(nsCtr, ctr); err != nil {
return err
}
+
ctr.config.MountNsCtr = nsCtr.ID()
return nil
@@ -2386,45 +2387,6 @@ func WithVolatile() CtrCreateOption {
}
}
-// WithPodCPUPAQ takes the given cpu period and quota and inserts them in the proper place.
-func WithPodCPUPAQ(period uint64, quota int64) PodCreateOption {
- return func(pod *Pod) error {
- if pod.valid {
- return define.ErrPodFinalized
- }
- if pod.CPUPeriod() != 0 && pod.CPUQuota() != 0 {
- pod.config.InfraContainer.ResourceLimits.CPU = &specs.LinuxCPU{
- Period: &period,
- Quota: &quota,
- }
- } else {
- pod.config.InfraContainer.ResourceLimits = &specs.LinuxResources{}
- pod.config.InfraContainer.ResourceLimits.CPU = &specs.LinuxCPU{
- Period: &period,
- Quota: &quota,
- }
- }
- return nil
- }
-}
-
-// WithPodCPUSetCPUS computes and sets the Cpus linux resource string which determines the amount of cores, from those available, we are allowed to execute on
-func WithPodCPUSetCPUs(inp string) PodCreateOption {
- return func(pod *Pod) error {
- if pod.valid {
- return define.ErrPodFinalized
- }
- if pod.ResourceLim().CPU.Period != nil {
- pod.config.InfraContainer.ResourceLimits.CPU.Cpus = inp
- } else {
- pod.config.InfraContainer.ResourceLimits = &specs.LinuxResources{}
- pod.config.InfraContainer.ResourceLimits.CPU = &specs.LinuxCPU{}
- pod.config.InfraContainer.ResourceLimits.CPU.Cpus = inp
- }
- return nil
- }
-}
-
func WithPodPidNS(inp specgen.Namespace) PodCreateOption {
return func(p *Pod) error {
if p.valid {