Skip to content

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?

No.

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?

What are the relevant issue numbers?

Closes https://gitlab.com/gitlab-org/gitlab-ee/issues/2181

Closes https://gitlab.com/gitlab-org/gitlab-ee/issues/2289

/cc @stanhu @brodock

Edited by Douglas Barbosa Alexandre

Merge request reports