moby/libcontainerd/supervisor
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
..
remote_daemon.go libcontainerd/supervisor: use pkg/pidfile for reading and writing pidfile 2022-11-04 01:50:26 +01:00
remote_daemon_linux.go move pkg/system: process to a separate package 2022-11-04 01:50:23 +01:00
remote_daemon_options.go libcontainerd/supervisor: don't write log-level to config file 2022-08-11 14:11:06 +02:00
remote_daemon_options_linux.go daemon: deprecate --oom-score-adjust for the daemon 2023-04-13 00:02:39 +02:00
remote_daemon_windows.go move pkg/system: process to a separate package 2022-11-04 01:50:23 +01:00
utils_linux.go libcontainerd: split client and supervisor 2018-08-06 10:23:04 -07:00
utils_windows.go libcontainerd: split client and supervisor 2018-08-06 10:23:04 -07:00