Moby Project - a collaborative project for the container ecosystem to assemble container-based systems
Go to file
Sebastiaan van Stijn 89ab14a115
libcontainerd/supervisor: make supervisor adjust OOM score for containerd
Containerd, like dockerd has a OOMScore configuration option to adjust its own
OOM score. In dockerd, this option was added when default installations were not
yet running the daemon as a systemd unit, which made it more complicated to set
the score, and adding a daemon option was convenient.

A binary adjusting its own score has been frowned upon, as it's more logical to
make that the responsibility of the process manager _starting_ the daemon, which
is what we did for dockerd in 21578530d7.

There have been discussions on deprecating the daemon flag for dockerd, and
similar discussions have been happening for containerd.

This patch changes how we set the OOM score for the containerd child process,
and to have dockerd (supervisor) set the OOM score, as it's acting as process
manager in this case (performing a role similar to systemd otherwise).

With this patch, the score is still adjusted as usual, but not written to the
containerd configuration file;

    dockerd --oom-score-adjust=-123
    cat /proc/$(pidof containerd)/oom_score_adj
    -123

As a follow-up, we may consider to adjust the containerd OOM score based on the
daemon's own score instead of on the `cli.OOMScoreAdjust` configuration so that
we will also adjust the score in situations where dockerd's OOM score was set
through other ways (systemd or manually adjusting the cgroup). A TODO was added
for this.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-08-11 14:11:01 +02:00
.github vendor buildkit 8e2d9b9 (v0.10 branch) 2022-08-05 14:40:46 +02:00
api vendor: github.com/moby/swarmkit/v2 v2.0.0-20220721174824-48dd89375d0a 2022-08-09 14:03:50 +02:00
builder daemon, builder: rename variables that collided with imports 2022-08-08 13:16:10 +02:00
cli add instructions to generate events message table bin 2022-04-14 19:52:36 +02:00
client client: linting: fix "invalid auth header" error 2022-07-29 23:05:22 +02:00
cmd libcontainerd/supervisor: make supervisor adjust OOM score for containerd 2022-08-11 14:11:01 +02:00
container state/Wait: Fix race when reading exit status 2022-07-20 09:23:31 +02:00
contrib Openrc: Depend on containerd init script 2022-06-01 15:09:52 +02:00
daemon vendor: github.com/moby/swarmkit/v2 v2.0.0-20220721174824-48dd89375d0a 2022-08-09 14:03:50 +02:00
distribution distribution: use types/registry.AuthConfig 2022-07-29 23:05:18 +02:00
dockerversion gofmt GoDoc comments with go1.19 2022-07-08 19:56:23 +02:00
docs vendor: github.com/moby/swarmkit/v2 v2.0.0-20220721174824-48dd89375d0a 2022-08-09 14:03:50 +02:00
errdefs errdefs: move GetHTTPErrorStatusCode to api/server/httpstatus 2022-03-21 12:22:39 +01:00
hack Merge pull request #43708 from thaJeztah/update_runc_binary 2022-08-08 11:47:23 +02:00
image Remove unused image/v1 code 2022-05-10 23:45:03 +02:00
integration testutil, integration: use types/registry.AuthConfig 2022-07-29 23:05:21 +02:00
integration-cli Merge pull request #43800 from corhere/implicit-runtime-config 2022-07-29 09:35:22 -07:00
internal/test/suite integration-cli: move each test suite to its own TestX testing function 2019-09-18 18:26:36 +00:00
layer layer: layerstore.Cleanup(): improve some logging 2022-06-21 13:34:03 +02:00
libcontainerd libcontainerd/supervisor: make supervisor adjust OOM score for containerd 2022-08-11 14:11:01 +02:00
libnetwork Test: wait for network changes in TestNetworkDBNodeJoinLeaveIteration 2022-07-21 22:56:58 +08:00
oci gofmt GoDoc comments with go1.19 2022-07-08 19:56:23 +02:00
opts opts: ParseTCPAddr(): extract parsing logic, consistent errors 2022-05-01 19:53:40 +02:00
pkg pkg/idtools: remove deprecated NewIdentityMapping, UIDS() and GIDS() 2022-08-09 18:03:29 +02:00
plugin plugin: use types/registry.AuthConfig 2022-07-29 23:05:19 +02:00
profiles profiles: seccomp: add syscalls related to PKU in default policy 2022-07-11 09:50:53 +08:00
project project: Add label kind/regression 2022-06-30 15:08:02 +02:00
quota gofmt GoDoc comments with go1.19 2022-07-08 19:56:23 +02:00
reference remove unneeded "digest" alias for "go-digest" 2022-03-04 14:49:42 +01:00
registry registry: use types/registry.AuthConfig 2022-07-29 23:05:20 +02:00
reports
restartmanager unconvert: remove unnescessary conversions 2019-09-18 12:57:33 +02:00
rootless rootless: remove redundant sync.Once 2022-04-25 13:53:32 +02:00
runconfig runconfig: ContainerDecoder(): fix handling of invalid JSON 2022-04-11 21:44:45 +02:00
testutil testutil, integration: use types/registry.AuthConfig 2022-07-29 23:05:21 +02:00
vendor vendor: github.com/moby/swarmkit/v2 v2.0.0-20220721174824-48dd89375d0a 2022-08-09 14:03:50 +02:00
volume fix formatting of "nolint" tags for go1.19 2022-07-13 22:31:53 +02:00
.DEREK.yml Update .DEREK.yml 2019-05-06 13:27:04 -07:00
.dockerignore use go-winres for cross to create Windows resources 2022-04-14 19:52:35 +02:00
.gitattributes chore: fix linguist for Dockerfile 2022-04-27 06:38:41 +02:00
.gitignore use go-winres for windows build and cleanup autogen and winresources 2022-04-14 19:52:36 +02:00
.mailmap update AUTHORS and mailmap 2022-06-03 12:29:40 +02:00
AUTHORS update AUTHORS and mailmap 2022-06-03 12:29:40 +02:00
CHANGELOG.md changelog: fix incorrectly named libnetwork label 2021-05-31 15:27:46 +02:00
CONTRIBUTING.md Removed the slack archives 2022-01-13 18:30:45 +01:00
Dockerfile Update golang to 1.18.5 2022-08-03 20:08:21 +02:00
Dockerfile.e2e Update golang to 1.18.5 2022-08-03 20:08:21 +02:00
Dockerfile.simple Update golang to 1.18.5 2022-08-03 20:08:21 +02:00
Dockerfile.windows update containerd binary to v1.6.7 2022-08-05 00:15:21 +02:00
Jenkinsfile Jenkinsfile: remove Windows stages 2022-05-31 22:14:15 +02:00
LICENSE Update LICENSE 2018-09-12 14:27:53 +01:00
MAINTAINERS Add Cory Snider (corhere) as maintainer 2022-07-14 19:38:48 +02:00
Makefile Merge pull request #43275 from kponichtera/43274-delve-debugger 2022-05-10 18:34:45 +02:00
NOTICE switch kr/pty to creack/pty v1.1.7 2019-07-29 16:59:08 -07:00
README.md
ROADMAP.md Fix some typos in ROADMAP.md 2019-01-25 14:27:13 +08:00
SECURITY.md Update SECURITY.md to have an option to keep name anonymous if requested. 2019-06-18 16:37:16 +00:00
TESTING.md TESTING.md: note that integration-cli is deprecated 2020-12-18 07:51:46 +01:00
VENDORING.md
codecov.yml codecov: disable "patch" status 2022-06-07 17:24:46 +02:00
docker-bake.hcl ci: add cross job in ci workflow 2022-04-10 21:03:54 +02:00
vendor.mod vendor: github.com/moby/swarmkit/v2 v2.0.0-20220721174824-48dd89375d0a 2022-08-09 14:03:50 +02:00
vendor.sum vendor: github.com/moby/swarmkit/v2 v2.0.0-20220721174824-48dd89375d0a 2022-08-09 14:03:50 +02:00

README.md

The Moby Project

Moby Project logo

Moby is an open-source project created by Docker to enable and accelerate software containerization.

It provides a "Lego set" of toolkit components, the framework for assembling them into custom container-based systems, and a place for all container enthusiasts and professionals to experiment and exchange ideas. Components include container build tools, a container registry, orchestration tools, a runtime and more, and these can be used as building blocks in conjunction with other tools and projects.

Principles

Moby is an open project guided by strong principles, aiming to be modular, flexible and without too strong an opinion on user experience. It is open to the community to help set its direction.

  • Modular: the project includes lots of components that have well-defined functions and APIs that work together.
  • Batteries included but swappable: Moby includes enough components to build fully featured container system, but its modular architecture ensures that most of the components can be swapped by different implementations.
  • Usable security: Moby provides secure defaults without compromising usability.
  • Developer focused: The APIs are intended to be functional and useful to build powerful tools. They are not necessarily intended as end user tools but as components aimed at developers. Documentation and UX is aimed at developers not end users.

Audience

The Moby Project is intended for engineers, integrators and enthusiasts looking to modify, hack, fix, experiment, invent and build systems based on containers. It is not for people looking for a commercially supported system, but for people who want to work and learn with open source code.

Relationship with Docker

The components and tools in the Moby Project are initially the open source components that Docker and the community have built for the Docker Project. New projects can be added if they fit with the community goals. Docker is committed to using Moby as the upstream for the Docker Product. However, other projects are also encouraged to use Moby as an upstream, and to reuse the components in diverse ways, and all these uses will be treated in the same way. External maintainers and contributors are welcomed.

The Moby project is not intended as a location for support or feature requests for Docker products, but as a place for contributors to work on open source code, fix bugs, and make the code more useful. The releases are supported by the maintainers, community and users, on a best efforts basis only, and are not intended for customers who want enterprise or commercial support; Docker EE is the appropriate product for these use cases.


Legal

Brought to you courtesy of our legal counsel. For more context, please see the NOTICE document in this repo.

Use and transfer of Moby may be subject to certain restrictions by the United States and other governments.

It is your responsibility to ensure that your use and/or transfer does not violate applicable laws.

For more information, please see https://www.bis.doc.gov

Licensing

Moby is licensed under the Apache License, Version 2.0. See LICENSE for the full license text.