aboutsummaryrefslogtreecommitdiff
path: root/pkg/domain
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 /pkg/domain
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 'pkg/domain')
-rw-r--r--pkg/domain/entities/pods.go37
1 files changed, 0 insertions, 37 deletions
diff --git a/pkg/domain/entities/pods.go b/pkg/domain/entities/pods.go
index 68e335f8d..abd6ba6c6 100644
--- a/pkg/domain/entities/pods.go
+++ b/pkg/domain/entities/pods.go
@@ -7,8 +7,6 @@ import (
"github.com/containers/podman/v3/libpod/define"
"github.com/containers/podman/v3/pkg/specgen"
- "github.com/containers/podman/v3/pkg/util"
- "github.com/opencontainers/runtime-spec/specs-go"
)
type PodKillOptions struct {
@@ -120,34 +118,12 @@ type PodCreateOptions struct {
Net *NetOptions
Share []string
Pid string
- Cpus float64
- CpusetCpus string
}
type PodCreateReport struct {
Id string //nolint
}
-func (p *PodCreateOptions) CPULimits() *specs.LinuxCPU {
- cpu := &specs.LinuxCPU{}
- hasLimits := false
-
- if p.Cpus != 0 {
- period, quota := util.CoresToPeriodAndQuota(p.Cpus)
- cpu.Period = &period
- cpu.Quota = &quota
- hasLimits = true
- }
- if p.CpusetCpus != "" {
- cpu.Cpus = p.CpusetCpus
- hasLimits = true
- }
- if !hasLimits {
- return cpu
- }
- return cpu
-}
-
func setNamespaces(p *PodCreateOptions) ([4]specgen.Namespace, error) {
allNS := [4]specgen.Namespace{}
if p.Pid != "" {
@@ -204,19 +180,6 @@ func (p *PodCreateOptions) ToPodSpecGen(s *specgen.PodSpecGenerator) error {
// Cgroup
s.CgroupParent = p.CGroupParent
- // Resource config
- cpuDat := p.CPULimits()
- if s.ResourceLimits == nil {
- s.ResourceLimits = &specs.LinuxResources{}
- s.ResourceLimits.CPU = &specs.LinuxCPU{}
- }
- if cpuDat != nil {
- s.ResourceLimits.CPU = cpuDat
- if p.Cpus != 0 {
- s.CPUPeriod = *cpuDat.Period
- s.CPUQuota = *cpuDat.Quota
- }
- }
return nil
}