summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-12-19 19:57:58 +0100
committerGitHub <noreply@github.com>2019-12-19 19:57:58 +0100
commit1ba6d0f883e17f2d460773f929873563b753d3e6 (patch)
tree9c03ab39c5ca33a26017e2ebc85fb12259b255a2 /cmd
parenta359ca0d1825859dd8b7c1384f11d703ec6625b4 (diff)
parentb7e656690662cf431902b71ea009dd0e0a625bae (diff)
downloadpodman-1ba6d0f883e17f2d460773f929873563b753d3e6.tar.gz
podman-1ba6d0f883e17f2d460773f929873563b753d3e6.tar.bz2
podman-1ba6d0f883e17f2d460773f929873563b753d3e6.zip
Merge pull request #4722 from giuseppe/drop-arbitrary-limit
libpod: drop arbitrary memory limit of 4M
Diffstat (limited to 'cmd')
-rw-r--r--cmd/podman/shared/create_cli.go14
1 files changed, 0 insertions, 14 deletions
diff --git a/cmd/podman/shared/create_cli.go b/cmd/podman/shared/create_cli.go
index 08a40b206..00b83906d 100644
--- a/cmd/podman/shared/create_cli.go
+++ b/cmd/podman/shared/create_cli.go
@@ -12,11 +12,6 @@ import (
"github.com/sirupsen/logrus"
)
-const (
- // It's not kernel limit, we want this 4M limit to supply a reasonable functional container
- linuxMinMemory = 4194304
-)
-
// GetAllLabels ...
func GetAllLabels(labelFile, inputLabels []string) (map[string]string, error) {
labels := make(map[string]string)
@@ -86,9 +81,6 @@ func verifyContainerResources(config *cc.CreateConfig, update bool) ([]string, e
sysInfo := sysinfo.New(true)
// memory subsystem checks and adjustments
- if config.Resources.Memory != 0 && config.Resources.Memory < linuxMinMemory {
- return warnings, fmt.Errorf("minimum memory limit allowed is 4MB")
- }
if config.Resources.Memory > 0 && !sysInfo.MemoryLimit {
warnings = addWarning(warnings, "Your kernel does not support memory limit capabilities or the cgroup is not mounted. Limitation discarded.")
config.Resources.Memory = 0
@@ -120,9 +112,6 @@ func verifyContainerResources(config *cc.CreateConfig, update bool) ([]string, e
warnings = addWarning(warnings, "Your kernel does not support memory soft limit capabilities or the cgroup is not mounted. Limitation discarded.")
config.Resources.MemoryReservation = 0
}
- if config.Resources.MemoryReservation > 0 && config.Resources.MemoryReservation < linuxMinMemory {
- return warnings, fmt.Errorf("minimum memory reservation allowed is 4MB")
- }
if config.Resources.Memory > 0 && config.Resources.MemoryReservation > 0 && config.Resources.Memory < config.Resources.MemoryReservation {
return warnings, fmt.Errorf("minimum memory limit cannot be less than memory reservation limit, see usage")
}
@@ -130,9 +119,6 @@ func verifyContainerResources(config *cc.CreateConfig, update bool) ([]string, e
warnings = addWarning(warnings, "Your kernel does not support kernel memory limit capabilities or the cgroup is not mounted. Limitation discarded.")
config.Resources.KernelMemory = 0
}
- if config.Resources.KernelMemory > 0 && config.Resources.KernelMemory < linuxMinMemory {
- return warnings, fmt.Errorf("minimum kernel memory limit allowed is 4MB")
- }
if config.Resources.DisableOomKiller && !sysInfo.OomKillDisable {
// only produce warnings if the setting wasn't to *disable* the OOM Kill; no point
// warning the caller if they already wanted the feature to be off