summaryrefslogtreecommitdiff
path: root/pkg/specgen/generate
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2021-12-22 06:20:21 -0500
committerDaniel J Walsh <dwalsh@redhat.com>2021-12-22 06:20:21 -0500
commita5e49d9668f430d8b7a8b1619fb2bf6c9087fed7 (patch)
tree860d52fa62dcc9ed0458971e5d4ff401aee69d35 /pkg/specgen/generate
parent3280204f727bb733b1c615cff68e8377a61eb185 (diff)
downloadpodman-a5e49d9668f430d8b7a8b1619fb2bf6c9087fed7.tar.gz
podman-a5e49d9668f430d8b7a8b1619fb2bf6c9087fed7.tar.bz2
podman-a5e49d9668f430d8b7a8b1619fb2bf6c9087fed7.zip
Warn on use of --kernel-memory
It has been deprecated and is no longer supported. Fully remove it and only print a warning if a user uses it. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2011695 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'pkg/specgen/generate')
-rw-r--r--pkg/specgen/generate/validate.go4
1 files changed, 0 insertions, 4 deletions
diff --git a/pkg/specgen/generate/validate.go b/pkg/specgen/generate/validate.go
index a44bf9979..c74db7325 100644
--- a/pkg/specgen/generate/validate.go
+++ b/pkg/specgen/generate/validate.go
@@ -60,10 +60,6 @@ func verifyContainerResourcesCgroupV1(s *specgen.SpecGenerator) ([]string, error
if memory.Limit != nil && memory.Reservation != nil && *memory.Limit < *memory.Reservation {
return warnings, errors.New("minimum memory limit cannot be less than memory reservation limit, see usage")
}
- if memory.Kernel != nil && !sysInfo.KernelMemory {
- warnings = append(warnings, "Your kernel does not support kernel memory limit capabilities or the cgroup is not mounted. Limitation discarded.")
- memory.Kernel = nil
- }
if memory.DisableOOMKiller != nil && *memory.DisableOOMKiller && !sysInfo.OomKillDisable {
warnings = append(warnings, "Your kernel does not support OomKillDisable. OomKillDisable discarded.")
memory.DisableOOMKiller = nil