Make geo_metrics_update_worker interval configurable in gitlab.rb
What does this MR do?
Adding an option to gitlab.rb to make geo_metrics_update_worker interval configurable as a temporary fix to alleviate excessive DB load.
Relates to gitlab#499952 (closed)
Changelog: added
EE: true
Related issues
- gitlab#499952 (closed)
- https://gitlab.com/gitlab-com/core-sub-department/section-core-request-for-help/-/issues/86
Test plan
- Set up a GitLab instance with Geo enabled.
- In the
gitlab.rb
file, add the following line:gitlab_rails['geo_metrics_update_worker_cron'] = '*/30 * * * *'
- Run
sudo gitlab-ctl reconfigure
- Check the GitLab Rails console by running:
sudo gitlab-rails console
- In the console, execute:
Gitlab::Geo.current_node.cron_jobs['geo_metrics_update_worker']['cron']
- If the output is '*/30 * * * ', then
. If it's still '/1 * * * *' (the default), then .
Checklist
See Definition of done.
For anything in this list which will not be completed, please provide a reason in the MR discussion.
Required
-
MR title and description are up to date, accurate, and descriptive. -
MR targeting the appropriate branch. -
Latest Merge Result pipeline is green. -
When ready for review, MR is labeled workflowready for review per the Distribution MR workflow.
For GitLab team members
If you don't have access to this, the reviewer should trigger these jobs for you during the review process.
-
The manual Trigger:ee-package
jobs have a green pipeline running against latest commit. -
If config/software
orconfig/patches
directories are changed, make sure thebuild-package-on-all-os
job within theTrigger:ee-package
downstream pipeline succeeded. -
If you are changing anything SSL related, then the Trigger:package:fips
manual job within theTrigger:ee-package
downstream pipeline must succeed. -
If CI configuration is changed, the branch must be pushed to dev.gitlab.org
to confirm regular branch builds aren't broken.
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. -
Validate potential values for new configuration settings. Formats such as integer 10
, duration10s
, URIscheme://user:passwd@host:port
may require quotation or other special handling when rendered in a template and written to a configuration file.
Merge request reports
Activity
assigned to @s_murray
added typebug label
1 Warning This MR has a Changelog commit for EE, but no code changes in ee/
. Consider removing theEE: true
trailer from your commits.Reviewer roulette
Changes that require review have been detected! A merge request is normally reviewed by both a reviewer and a maintainer in its primary category and by a maintainer in all other categories.
To spread load more evenly across eligible reviewers, Danger has picked a candidate for each review slot. Feel free to override these selections if you think someone else would be better-suited or use the GitLab Review Workload Dashboard to find other available reviewers.
To read more on how to use the reviewer roulette, please take a look at the Engineering workflow and code review guidelines. Please consider assigning a reviewer or maintainer who is a domain expert in the area of the merge request.
Once you've decided who will review this merge request, mention them as you normally would! Danger does not automatically notify them for you.
Reviewer Maintainer @pursultani
(UTC+11)
@balasankarc
(UTC+5.5)
If needed, you can retry the
danger-review
job that generated this comment.Generated by
DangerEdited by Ghost User- Resolved by Balasankar 'Balu' C
Hey @mkozono!
Two QQ's for you on this:-- I wasn't sure if we had any docs/guidelines for adding new options to
gitlab.rb
so I've just tried to mimic the entries we have for existing worker options. I've yet to test this on my VM but at a quick glance, do these changes look OK? I think everything in the main repo is already set up to work with this (theSettings.cron_jobs['geo_metrics_update_worker']
entries in1_settings.rb
) so assume we don't need to change anything in that repo? - For documentation, are the comments in the changes sufficient or do I need to document it elsewhere? I can't see any reference to the other worker options in the Geo docs so I guess this is enough?
Thanks!
- I wasn't sure if we had any docs/guidelines for adding new options to
added 1 commit
- 62f3b33b - Make geo_metrics_update_worker interval configurable
mentioned in merge request gitlab!175434 (merged)
marked the checklist item When ready for review, MR is labeled workflowready for review per the Distribution MR workflow. as completed
added workflowready for review label
changed milestone to %17.8
added backend label
added GitLab Premium label
added bugperformance label