Add chaos background worker jobs
We already have chaos endpoints: https://docs.gitlab.com/ee/development/chaos_endpoints.html
With https://gitlab.com/gitlab-com/gl-infra/infrastructure/issues/7262, it would have been really helpful to have the same endpoints, invoked through background jobs.
I propose we add these, invoking them through the following web endpoints
GET /-/chaos/async/leakmem?memory_mb=1024&duration_s=50
GET /-/chaos/async/cpu_spin?duration_s=50
GET /-/chaos/async/db_spin?duration_s=50
GET /-/chaos/async/sleep?duration_s=50
GET /-/chaos/async/kill
The behaviour of these calls will be the same as the web endpoints, but will be invoked in Sidekiq.
Implemented in https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/30814
Edited by Andrew Newdigate