Commit 2e25118
committed
Dont ignore failure to create cgroup after timeout
Before this commit, creating a cgroup would silently ignore timeouts and
carry on. Concretely, this caused cases where a cgroup failed to create,
but the caller doesn't realize and ends up looking for files that should
exist (e.g. cgroups.controllers), only to find they don't exist. It's
very difficult as a caller to deal with this case, where NewSystemd
succeeds but the group doesn't exist.
The origins of this code seem to trace back to an initial implementation
written 5+ years ago:
5efa14e#diff-3331981e4ac06a8d9b06e91842b7f2759c7af3b65287e489a88385948d311ebdR672
runc added roughly the same logic here to deal with the same issue:
opencontainers/runc#3782
Now, containerd will also error if a cgroup cannot be created within the
timeout window.
Signed-off-by: Josh Chorlton <jchorlton@gmail.com>1 parent 190de3b commit 2e25118
1 file changed
+4
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
952 | 952 | | |
953 | 953 | | |
954 | 954 | | |
| 955 | + | |
955 | 956 | | |
956 | 957 | | |
957 | 958 | | |
958 | 959 | | |
959 | 960 | | |
960 | 961 | | |
961 | | - | |
962 | | - | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
963 | 965 | | |
964 | 966 | | |
965 | 967 | | |
| |||
0 commit comments