cgroups icon indicating copy to clipboard operation
cgroups copied to clipboard

call control.Delete() occur err=cgroups: unable to remove path "/sys/fs/cgroup/devices/test"

Open ycchildcoder opened this issue 5 years ago • 1 comments

I write a test,when I call control.Delete() , it occur error: err=cgroups: unable to remove path "/sys/fs/cgroup/devices/test" inside err= unlinkat /sys/fs/cgroup/devices/test/tasks: operation not permitted I don't know why, when i remove control.Add(cgroups.Process{Pid: 1234}), it has not error。 thanks

ycchildcoder avatar Mar 06 '20 14:03 ycchildcoder

Adding os.Remove() before os.RemoveAll() solves the issue?

https://github.com/containerd/cgroups/blob/10dcde236e523a22c2f9f0013f7ebb8e4a065a5e/utils.go#L153

AkihiroSuda avatar Mar 06 '20 15:03 AkihiroSuda