moby/daemon/config
Sebastiaan van Stijn 5a922dc162
daemon: deprecate --oom-score-adjust for the daemon
The `oom-score-adjust` option was added in a894aec8d8,
to prevent the daemon from being OOM-killed before other processes. This
option was mostly added as a "convenience", as running the daemon as a
systemd unit was not yet common.

Having the daemon set its own limits is not best-practice, and something
better handled by the process-manager starting the daemon.

Commit cf7a5be0f2 fixed this option to allow
disabling it, and 2b8e68ef06 removed the default
score adjust.

This patch deprecates the option altogether, recommending users to set these
limits through the process manager used, such as the "OOMScoreAdjust" option
in systemd units.

With this patch:

    dockerd --oom-score-adjust=-500 --validate
    Flag --oom-score-adjust has been deprecated, and will be removed in the next release.
    configuration OK

    echo '{"oom-score-adjust":-500}' > /etc/docker/daemon.json
    dockerd
    INFO[2023-04-12T21:34:51.133389627Z] Starting up
    INFO[2023-04-12T21:34:51.135607544Z] containerd not running, starting managed containerd
    WARN[2023-04-12T21:34:51.135629086Z] DEPRECATED: The "oom-score-adjust" config parameter and the dockerd "--oom-score-adjust" option will be removed in the next release.

    docker info
    Client:
      Context:    default
      Debug Mode: false
    ...
    DEPRECATED: The "oom-score-adjust" config parameter and the dockerd "--oom-score-adjust" option will be removed in the next release

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2023-04-13 00:02:39 +02:00
..
builder.go vendor: update buildkit to v0.11.2 2023-02-01 23:29:10 -08:00
builder_test.go daemon/config: use strings.Cut(), fix panic in BuilderGCFilter 2022-11-16 15:15:05 +01:00
config.go d/config: fix default-network-opts in daemon.json 2023-04-03 15:59:53 -04:00
config_linux.go daemon: deprecate --oom-score-adjust for the daemon 2023-04-13 00:02:39 +02:00
config_linux_test.go d/config: fix default-network-opts in daemon.json 2023-04-03 15:59:53 -04:00
config_test.go daemon/config: inform the user when the input JSON contains invalid UTF-8 2023-01-10 17:27:21 -07:00
config_windows.go daemon/config: New(): initialize config with platform-specific defaults 2022-08-17 08:54:32 +02:00
config_windows_test.go daemon/config: clean up tests to use common helper 2023-01-10 13:54:17 -07:00
opts.go Bump swarmkit to v2 2022-04-21 17:33:07 -04:00