Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

config-linux: Move 'disableOOMKiller' under 'memory' #896

Merged

Conversation

wking
Copy link
Contributor

@wking wking commented Jul 12, 2017

Fixes #806.

It's backed by memory.oom_control, so this commit moves it in with
the rest of the memory-controller config.

Looking at the history, the initial request landing a setting for this
in the Docker/OCI ecosystem seems to be [1], which added
Cgroup.OomKillDisable.  That commit was carried from libcontainer into
runC [2] where it is now Resources.OomKillDisable [3].  From runC it
was carried into this repo (with some renaming) in [4].  Subsequent
early doc updates landed in [5,6].  In none of those can I find
discussion about why the setting is not already under memory.  I
expect the reason is that the runC structures are flat, so "under
memory" is not a thing there.  But in this spec, resources has
per-controller sub-properties.  The fact that disableOOMKiller
belonged to the memory controller may have been overlooked in [4] and
never revisited until now.

[1]: docker-archive/libcontainer#417
     Subject: cgroups: add support for oom control
[2]: opencontainers/runc@295c708
     Subject: cgroups: add support for oom control
[3]: https://github.com/opencontainers/runc/blob/v1.0.0-rc3/libcontainer/configs/cgroup_unix.go#L113-L114
[4]: opencontainers#51
     Subject: Add Go types for specification
[5]: opencontainers#137
     Subject: Adding cgroups path to the Spec.
[6]: opencontainers#199
     Subject: runtime: config: linux: add cgroups informations

Signed-off-by: W. Trevor King <wking@tremily.us>
@crosbymichael
Copy link
Member

crosbymichael commented Jul 12, 2017

LGTM

Approved with PullApprove

@mrunalp
Copy link
Contributor

mrunalp commented Jul 12, 2017

LGTM

Approved with PullApprove

@mrunalp mrunalp merged commit a7bc89b into opencontainers:master Jul 12, 2017
wking added a commit to wking/opencontainer-runtime-spec that referenced this pull request Jul 12, 2017
Through FIXME (whatever commit merges both opencontainers#895 and opencontainers#896).

Signed-off-by: W. Trevor King <wking@tremily.us>
wking added a commit to wking/opencontainer-runtime-spec that referenced this pull request Jul 12, 2017
Through FIXME (whatever commit merges both opencontainers#895 and opencontainers#896).

Signed-off-by: W. Trevor King <wking@tremily.us>
@wking wking deleted the disable-oom-killer-under-memory branch July 12, 2017 22:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants