summaryrefslogtreecommitdiff
path: root/cmd/podman/common/create_opts.go
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 /cmd/podman/common/create_opts.go
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 'cmd/podman/common/create_opts.go')
-rw-r--r--cmd/podman/common/create_opts.go7
1 files changed, 0 insertions, 7 deletions
diff --git a/cmd/podman/common/create_opts.go b/cmd/podman/common/create_opts.go
index 990c1c063..f2335a2be 100644
--- a/cmd/podman/common/create_opts.go
+++ b/cmd/podman/common/create_opts.go
@@ -18,7 +18,6 @@ import (
"github.com/containers/podman/v3/pkg/specgen"
"github.com/docker/docker/api/types/mount"
"github.com/pkg/errors"
- "github.com/sirupsen/logrus"
)
func stringMaptoArray(m map[string]string) []string {
@@ -385,9 +384,6 @@ func ContainerCreateToContainerCLIOpts(cc handlers.CreateContainerConfig, rtc *c
if cc.HostConfig.Memory > 0 {
cliOpts.Memory = strconv.Itoa(int(cc.HostConfig.Memory))
}
- if cc.HostConfig.KernelMemory > 0 {
- logrus.Warnf("The --kernel-memory flag has been deprecated. May not work properly on your system.")
- }
if cc.HostConfig.MemoryReservation > 0 {
cliOpts.MemoryReservation = strconv.Itoa(int(cc.HostConfig.MemoryReservation))
@@ -409,9 +405,6 @@ func ContainerCreateToContainerCLIOpts(cc handlers.CreateContainerConfig, rtc *c
cliOpts.ShmSize = strconv.Itoa(int(cc.HostConfig.ShmSize))
}
- if cc.HostConfig.KernelMemory > 0 {
- cliOpts.KernelMemory = strconv.Itoa(int(cc.HostConfig.KernelMemory))
- }
if len(cc.HostConfig.RestartPolicy.Name) > 0 {
policy := cc.HostConfig.RestartPolicy.Name
// only add restart count on failure