diff options
author | Sebastiaan van Stijn <github@gone.nl> | 2023-05-06 15:04:41 +0200 |
---|---|---|
committer | Sebastiaan van Stijn <github@gone.nl> | 2023-05-06 16:36:17 +0200 |
commit | fb96b94ed00aa4f200dc03642bc46d4289eb6860 (patch) | |
tree | 2b8288902106d1f148b08177c825188e8e1ec974 /cmd/dockerd/config_unix.go | |
parent | 316781be48bb72770e07d41d469c79ef4194483b (diff) | |
download | docker-fb96b94ed00aa4f200dc03642bc46d4289eb6860.tar.gz |
daemon: remove handling for deprecated "oom-score-adjust", and produce error
This option was deprecated in 5a922dc162bbe0a03450165da4e6aceca55073d4, which
is part of the v24.0.0 release, so we can remove it from master.
This patch;
- adds a check to ValidatePlatformConfig, and produces a fatal error
if oom-score-adjust is set
- removes the deprecated libcontainerd/supervisor.WithOOMScore
- removes the warning from docker info
With this patch:
dockerd --oom-score-adjust=-500 --validate
Flag --oom-score-adjust has been deprecated, and will be removed in the next release.
unable to configure the Docker daemon with file /etc/docker/daemon.json: merged configuration validation from file and command line flags failed: DEPRECATED: The "oom-score-adjust" config parameter and the dockerd "--oom-score-adjust" options have been removed.
And when using `daemon.json`:
dockerd --validate
unable to configure the Docker daemon with file /etc/docker/daemon.json: merged configuration validation from file and command line flags failed: DEPRECATED: The "oom-score-adjust" config parameter and the dockerd "--oom-score-adjust" options have been removed.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Diffstat (limited to 'cmd/dockerd/config_unix.go')
-rw-r--r-- | cmd/dockerd/config_unix.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/cmd/dockerd/config_unix.go b/cmd/dockerd/config_unix.go index 95c0dcd74a..f7aac2c0f3 100644 --- a/cmd/dockerd/config_unix.go +++ b/cmd/dockerd/config_unix.go @@ -46,6 +46,7 @@ func installConfigFlags(conf *config.Config, flags *pflag.FlagSet) error { flags.StringVar(&conf.CgroupParent, "cgroup-parent", "", "Set parent cgroup for all containers") flags.StringVar(&conf.RemappedRoot, "userns-remap", "", "User/Group setting for user namespaces") flags.BoolVar(&conf.LiveRestoreEnabled, "live-restore", false, "Enable live restore of docker when containers are still running") + // TODO(thaJeztah): Used to produce a deprecation error; remove the flag and the OOMScoreAdjust field for the next release after v25.0.0. flags.IntVar(&conf.OOMScoreAdjust, "oom-score-adjust", 0, "Set the oom_score_adj for the daemon (deprecated)") _ = flags.MarkDeprecated("oom-score-adjust", "and will be removed in the next release.") flags.BoolVar(&conf.Init, "init", false, "Run an init in the container to forward signals and reap processes") |