You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Working on fixing #3132, I tried to use a new instance of cgroup manager (as a part of runc run) to check if cgroup already exists (and get all its PIDs). To my suprise, it did not work for most of cgroup managers, because Exists() (and GetAllPids()) rely on cgroup paths being known, and those paths are only initialized during Apply().
In general, it's impossible to use a new instance of a cgroup manager created without known paths (as it is usually done except for runc exec/restore/delete for anything but Apply()!
This issue can be workarounded in many cases by providing an initialized set of paths to New*Manager, but it is not always possible.
There were attempts to partially solve it before on a case-by-case basis (see e.g. commit 4f8ccc5), but that was spotty/incomplete.
The fix is relatively easy (but lengthy)-- we need to move paths initialization from Apply() to New*Manager. This also requires an ability to return an error from New*Manager, as sometimes the cgroup Name/Parent/Path provided is incorrect and we can't initialize paths.
The text was updated successfully, but these errors were encountered:
Working on fixing #3132, I tried to use a new instance of cgroup manager (as a part of
runc run
) to check if cgroup already exists (and get all its PIDs). To my suprise, it did not work for most of cgroup managers, becauseExists()
(andGetAllPids()
) rely on cgroup paths being known, and those paths are only initialized duringApply()
.In general, it's impossible to use a new instance of a cgroup manager created without known paths (as it is usually done except for
runc exec/restore/delete
for anything butApply()
!This issue can be workarounded in many cases by providing an initialized set of paths to
New*Manager
, but it is not always possible.There were attempts to partially solve it before on a case-by-case basis (see e.g. commit 4f8ccc5), but that was spotty/incomplete.
The fix is relatively easy (but lengthy)-- we need to move paths initialization from Apply() to
New*Manager
. This also requires an ability to return an error from New*Manager, as sometimes the cgroup Name/Parent/Path provided is incorrect and we can't initialize paths.The text was updated successfully, but these errors were encountered: