[Feature flag] Exec commands directly in Cgroups
What
Enable the :exec_command_directly_in_cgroup
to execute commands directly in correct cgroups. By default Gitaly first executes a command, and then later adds it to a cgroup. Between starting the command and configuring the cgroup, there's a period when the command doesn't execute with the appropriate limits and in the correct cgroup. Enabling the flag makes Gitaly launch the commands directly in correct cgroups.
Owners
- Team: Gitaly
- Most appropriate slack channel to reach out to:
#g_gitaly
- Best individual to reach out to: @samihiltunen
Expectations
What release does this feature occur in first?
What are we expecting to happen?
Gitaly executes commands directly in the correct cgroups.
What might happen if this goes wrong?
Cgroups related functionality may fail. Spawning commands may fail, causing all RPCs that do so (most) to fail.
What can we monitor to detect problems with this?
Apdex is likely the best place to monitor as this affects the operation of the service overall.
- grpd: https://dashboards.gitlab.net/d/gitaly-main/gitaly-overview?orgId=1
- gstg: https://dashboards.gitlab.net/d/gitaly-main/gitaly-overview?orgId=1&var-PROMETHEUS_DS=Global&var-environment=gstg&var-stage=main
Roll Out Steps
-
Enable on staging -
Is the required code deployed on staging? (howto) -
Enable on staging (howto) -
Add featureflagstaging to this issue (howto) -
Test on staging (howto) -
Verify the feature flag was used by checking Prometheus metric gitaly_feature_flag_checks_total
-
-
Enable on production -
Is the required code deployed on production? (howto) -
Progressively enable in production (howto) -
Add featureflagproduction to this issue -
Verify the feature flag was used by checking Prometheus metric gitaly_feature_flag_checks_total
-
-
Create subsequent issues -
To default enable the feature flag (optional, only required if backwards-compatibility concerns exist) -
Create issue using the Feature Flag Default Enable
template. -
Set milestone to current+1 release
-
-
To Remove feature flag -
Create issue using the Feature Flag Removal
template. -
Set milestone to current+1 (+2 if we created an issue to default enable the flag).
-
-
Please refer to the documentation of feature flags for further information.