containerd still creates files in /run/containerd when `state` is set to a different value

Created on 27 Feb 2021  路  2Comments  路  Source: containerd/containerd

What is the problem you're trying to solve
When configuring containerd with the state directory set to a non-default value, containerd still creates files in /run/containerd. This occurs because /run/containerd is hard-coded in utils.RuncRoot.

Describe the solution you'd like
Clients can specify an alternate runc root directory through Options, but it would be nice to have a client-independent behavior.

kinfeature

Most helpful comment

True. The difference with the sockets at /run/containerd/s compared to the directories and files created for runc are that the socket paths incorporate the daemon socket address in the hash function while the runc path is strictly namespace + ID. The effect of that means that if you run two containerd daemons with different state directories, you can still end up creating conflicts if you try to run containers with the same (namespace, ID) pair in the separate daemons.

All 2 comments

We have hard-coded sockets under /run/containerd/s, so creating files under /run/containerd is inevitable even with #5097

True. The difference with the sockets at /run/containerd/s compared to the directories and files created for runc are that the socket paths incorporate the daemon socket address in the hash function while the runc path is strictly namespace + ID. The effect of that means that if you run two containerd daemons with different state directories, you can still end up creating conflicts if you try to run containers with the same (namespace, ID) pair in the separate daemons.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pierreozoux picture pierreozoux  路  4Comments

cnhuye picture cnhuye  路  4Comments

stevvooe picture stevvooe  路  4Comments

oldthreefeng picture oldthreefeng  路  4Comments

greole picture greole  路  3Comments