cgroups icon indicating copy to clipboard operation
cgroups copied to clipboard

dont ignore failure to create cgroup after timeout

Open jchorl opened this issue 1 year ago • 2 comments

I noticed that creating a cgroup will silently ignore timeouts and continue on. Concretely, I've hit cases where a cgroup fails to get created, and the caller ends up looking for cgroups.controllers only to find it isn't there.

It's very difficult as a caller to deal with this case, where NewSystemd succeeds but the group doesn't exist.

I traced the origins of this code to https://github.com/containerd/cgroups/commit/5efa14e3dbc5c34d93de6c706af24fea4a30de46#diff-3331981e4ac06a8d9b06e91842b7f2759c7af3b65287e489a88385948d311ebdR672 - which was written 5+ years ago.

runc added roughly the same logic here: https://github.com/opencontainers/runc/pull/3782

jchorl avatar Sep 18 '24 18:09 jchorl

Looks good, but can you squash the commits and write the same blurb you have in the PR description in the commit message? Thanks!

dcantah avatar Sep 20 '24 08:09 dcantah

Looks good, but can you squash the commits and write the same blurb you have in the PR description in the commit message? Thanks!

Done!

jchorl avatar Sep 21 '24 15:09 jchorl

@dcantah what's the path to getting this merged?

jchorl avatar Nov 05 '24 13:11 jchorl

@jchorl Just needs another approval, I'll shop this around to folks

dcantah avatar Nov 05 '24 19:11 dcantah