Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Currently runc allows multiple containers to share the same cgroup (for example, by having the same cgroupPath in config.json). While such shared configuration might be OK, there are some issues: - When each container has its own resource limits, the order of containers start determines whose limits will be effectively applied. - When one of containers is paused, all others are paused, too. - When a container is paused, any attempt to do runc create/run/exec end up with runc init stuck inside a frozen cgroup. - When a systemd cgroup manager is used, this becomes even worse -- such as, stop (or even failed start) of any container results in "stopTransientUnit" command being sent to systemd, and so (depending on unit properties) other containers can receive SIGTERM, be killed after a timeout etc. All this may lead to various hard-to-debug situations in production (runc init stuck, cgroup removal error, wrong resource limits etc). One obvious solution is to require a non-existent cgroup for the new container, or fail if a cgroup already exists. This is exactly what this commit implements. Signed-off-by: Kir Kolyshkin <[email protected]>
- Loading branch information