Skip to content

Create cgroup root directory on gitaly startup

John Cai requested to merge jc-add-cgroup-root-creation into master

What does this MR do?

Currently, Gitaly will fail on a reboot if cgroups are configured. The reason is that gitlab-ctl reconfigure creates the cgroup mount directory, which then Gitaly uses to create cgroups. However, on a reboot this directory can disappear.

This change:

If cgroups are configured for Gitaly, allow the sv script to create them before starting up Gitaly. Since cgroups are ephemeral, they can disappear on a reboot and currently only the recofigure script will create them. This way, we protect against gitaly failing to start up if its cgroup root is missing.

If we create the directories on startup, that also means we can remove the code that creates it on a chef run.

Related issues

https://gitlab.com/gitlab-com/gl-infra/infrastructure/-/issues/13092

more context in: gitaly!4204 (closed)

Checklist

See Definition of done.

For anything in this list which will not be completed, please provide a reason in the MR discussion

Required

  • Merge Request Title, and Description are up to date, accurate, and descriptive
  • MR targeting the appropriate branch
  • MR has a green pipeline on GitLab.com
  • Pipeline is green on dev.gitlab.org if the change is touching anything besides documentation or internal cookbooks
  • trigger-package has a green pipeline running against latest commit

Expected (please provide an explanation if not completing)

  • Test plan indicating conditions for success has been posted and passes
  • Documentation created/updated
  • Tests added
  • Integration tests added to GitLab QA
  • Equivalent MR/issue for the GitLab Chart opened
Edited by John Cai

Merge request reports