Geo - Properly set tracking database connection and cron jobs on secondary node
What does this MR do?
Check if the
geo_secondary_role is enabled on a secondary node to configure the database connection and the Sidekiq cron jobs correctly. This way if
Gitlab::Geo.secondary? changes, we avoid requiring a full unicorn restart on the secondary node.
Are there points in the code the reviewer needs to double check?
Why was this MR needed?
When the Geo secondary node settings have been changed on the primary node the tracking database connection and the Sidekiq jobs will not be correctly set/activated on a secondary node because the changes happen on the primary node, the secondary node does not have knowledge that this happened.
Does this MR meet the acceptance criteria?
- Changelog entry added, if necessary
- API support added
- Added for this feature/bug
- All builds are passing
- Conform by the merge request performance guides
- Conform by the style guides
Branch has no merge conflicts with
master(if it does - rebase it please)
- Squashed related commits together