[go: up one dir, main page]

Skip to content

Ignore files in process directory

What

Instead of returning error of files in process directory, silently ignore the file found.

Why

PruneOldGitalyProcessDirectories is used to delete the cgroup directory under the hierarchy_root for example /gitaly. Inside the cgroup directory there is always files like cpu.stat and much more, so it's normal to have files in a cgroup, it's how they are controlled.

In production, we are seeing logs below that end up being noise and not really useful:

{"error":"gitaly process directory contains an unexpected file","level":"error","msg":"could not prune entry","path":"/sys/fs/cgroup/cpu/gitaly/cpuacct.usage_percpu_user","time":"2022-09-22T22:03:57.874Z"}
{"error":"gitaly process directory contains an unexpected file","level":"error","msg":"could not prune entry","path":"/sys/fs/cgroup/cpu/gitaly/cpuacct.usage_sys","time":"2022-09-22T22:03:57.874Z"}
{"error":"gitaly process directory contains an unexpected file","level":"error","msg":"could not prune entry","path":"/sys/fs/cgroup/cpu/gitaly/cpuacct.usage_user","time":"2022-09-22T22:03:57.874Z"}
{"error":"gitaly process directory contains an unexpected file","level":"error","msg":"could not prune entry","path":"/sys/fs/cgroup/cpu/gitaly/notify_on_release","time":"2022-09-22T22:03:57.874Z"}
{"error":"gitaly process directory contains an unexpected file","level":"error","msg":"could not prune entry","path":"/sys/fs/cgroup/cpu/gitaly/tasks","time":"2022-09-22T22:03:57.874Z"}

Closes: https://gitlab.com/gitlab-com/gl-infra/reliability/-/issues/16270

Merge request reports

Loading