cli
cli copied to clipboard
Docker client hardcodes --oom-score-adj=0 by default, while the expected default would be to *NOT* change oom score adj
Description
Hi,
As described in https://github.com/containers/podman/issues/19930#issuecomment-1715401284 it seems that currently in the docker client code, the default value of oomScoreAdj
https://github.com/docker/cli/blob/843951e84a4a0326e3309a1658e572fd359cd14f/cli/command/container/opts.go#L92 is zero, which is unexpected. The right default value for this value should be nil
(ie explicitly not provided by the user, so the container engine shall not try to set the oom score adjutement). When docker is used as a client to target podman, podman thinks the user explicitly provided 0 while most of the time people don't even set this.
Would it be possible to change the type of this oomScoreAdj
to some "optional int" (I don't know how this is best written in go, as I am not myself a go developer) ?
Reproduce
Given the description, I don't think reproduction steps are needed.
Expected behavior
0 shouldn't be the default behavior of oomScoreAdj
, it should be nil
and no value passed to the docker deamon.
docker version
Any docker version
docker info
Not needed
Additional Info
No response