Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

daemon: remove v1 shim configuration for containerd#41675

Merged
thaJeztah merged 1 commit into
moby:mastermoby/moby:masterfrom
thaJeztah:remove_containerd_plugin_configthaJeztah/docker:remove_containerd_plugin_configCopy head branch name to clipboard
Mar 8, 2022
Merged

daemon: remove v1 shim configuration for containerd#41675
thaJeztah merged 1 commit into
moby:mastermoby/moby:masterfrom
thaJeztah:remove_containerd_plugin_configthaJeztah/docker:remove_containerd_plugin_configCopy head branch name to clipboard

Conversation

@thaJeztah

Copy link
Copy Markdown
Member

relates to #41656 (specifically #41656 (comment))

This removes the plugin section from the containerd configuration file (/var/run/docker/containerd/containerd.toml) that is generated when starting containerd as child process;

[plugins]
  [plugins.linux]
    shim = "containerd-shim"
    runtime = "runc"
    runtime_root = "/var/lib/docker/runc"
    no_shim = false
    shim_debug = true

This configuration doesn't appear to be used since commit: 0b14c2b (#41210), which switched the default runtime to to io.containerd.runc.v2.

Note that containerd itself uses containerd-shim and runc as default for shim and runtime v1, so omitting that configuration doesn't seem to make a difference.

I'm slightly confused if any of the other options in this configuration were actually used: for example, even though runtime_root was configured to be /var/lib/docker/runc, when starting a container with that coniguration set on docker 19.03, /var/lib/docker/runc doesn't appear to exist:

$ docker ps
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS               NAMES
098baa4cb0e7        nginx:alpine        "/docker-entrypoint.…"   59 minutes ago      Up 59 minutes       80/tcp              foo

$ ls /var/lib/docker/runc
ls: /var/lib/docker/runc: No such file or directory

$ ps auxf
PID   USER     TIME  COMMAND
    1 root      0:00 sh
   16 root      0:11 dockerd --debug
   26 root      0:09 containerd --config /var/run/docker/containerd/containerd.toml --log-level debug
  234 root      0:00 containerd-shim -namespace moby -workdir /var/lib/docker/containerd/daemon/io.containerd.runtime.v1.linux/moby/09
  251 root      0:00 nginx: master process nginx -g daemon off;
  304 101       0:00 nginx: worker process
...

- Description for the changelog

@thaJeztah thaJeztah added area/runtime Runtime status/2-code-review kind/refactor PR's that refactor, or clean-up code labels Nov 16, 2020
@thaJeztah thaJeztah added this to the 20.10.0 milestone Nov 16, 2020
@thaJeztah

Copy link
Copy Markdown
Member Author

@AkihiroSuda @cpuguy83 @tonistiigi PTAL; IIUC, this configuration was not used at all. I'm slightly confused though why the runtime_root was not used (or perhaps I didn't check correctly). Also wondering if the v2 shim does not need a similar section in the containerd.toml that we generate

@thaJeztah
thaJeztah force-pushed the remove_containerd_plugin_config branch from f43b2d6 to a823621 Compare November 30, 2020 11:46
@thaJeztah

Copy link
Copy Markdown
Member Author

@cpuguy83 @tonistiigi PTAL

@thaJeztah
thaJeztah force-pushed the remove_containerd_plugin_config branch from a823621 to b387735 Compare December 3, 2020 15:05
@thaJeztah

Copy link
Copy Markdown
Member Author

Rebased

@thaJeztah thaJeztah modified the milestones: 20.10.0, 20.10.1, 20.10.2 Dec 9, 2020
@thaJeztah thaJeztah modified the milestones: 20.10.2, 20.10.3 Jan 5, 2021
@thaJeztah thaJeztah modified the milestones: 20.10.3, 20.10.4, 21.xx Feb 2, 2021
@thaJeztah
thaJeztah force-pushed the remove_containerd_plugin_config branch from b387735 to 9ecf645 Compare June 8, 2021 08:08
@thaJeztah

Copy link
Copy Markdown
Member Author

rebased

@cpuguy83 cpuguy83 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@thaJeztah
thaJeztah force-pushed the remove_containerd_plugin_config branch from 9ecf645 to a78ae04 Compare July 10, 2021 12:59
@thaJeztah

Copy link
Copy Markdown
Member Author

Rebased to get a fresh run of CI

Is this one Good to go? (Anything we need to mention in the documentation?)

This removes the plugin section from the containerd configuration file
(`/var/run/docker/containerd/containerd.toml`) that is generated when
starting containerd as child process;

```toml
[plugins]
  [plugins.linux]
    shim = "containerd-shim"
    runtime = "runc"
    runtime_root = "/var/lib/docker/runc"
    no_shim = false
    shim_debug = true
```

This configuration doesn't appear to be used since commit:
0b14c2b, which switched the default runtime
to to io.containerd.runc.v2.

Note that containerd itself uses `containerd-shim` and `runc` as default
for `shim` and `runtime` v1, so omitting that configuration doesn't seem
to make a difference.

I'm slightly confused if any of the other options in this configuration were
actually used: for example, even though `runtime_root` was configured to be
`/var/lib/docker/runc`, when starting a container with that coniguration set
on docker 19.03, `/var/lib/docker/runc` doesn't appear to exist:

```console
$ docker ps
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS               NAMES
098baa4cb0e7        nginx:alpine        "/docker-entrypoint.…"   59 minutes ago      Up 59 minutes       80/tcp              foo

$ ls /var/lib/docker/runc
ls: /var/lib/docker/runc: No such file or directory

$ ps auxf
PID   USER     TIME  COMMAND
    1 root      0:00 sh
   16 root      0:11 dockerd --debug
   26 root      0:09 containerd --config /var/run/docker/containerd/containerd.toml --log-level debug
  234 root      0:00 containerd-shim -namespace moby -workdir /var/lib/docker/containerd/daemon/io.containerd.runtime.v1.linux/moby/09
  251 root      0:00 nginx: master process nginx -g daemon off;
  304 101       0:00 nginx: worker process
...

```

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah
thaJeztah force-pushed the remove_containerd_plugin_config branch from a78ae04 to 2c97295 Compare March 7, 2022 18:31
@thaJeztah
thaJeztah merged commit 2c7c092 into moby:master Mar 8, 2022
@thaJeztah
thaJeztah deleted the remove_containerd_plugin_config branch March 8, 2022 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/runtime Runtime impact/changelog kind/refactor PR's that refactor, or clean-up code status/4-merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.