Reconfigure skips Geo DB migrations if Geo DB is not running on the same machine
We run Geo DB migrations on reconfigure: https://gitlab.com/gitlab-org/omnibus-gitlab/blob/12.3.1+ee.0/files/gitlab-cookbooks/gitlab-ee/recipes/default.rb#L52
Conditions:
geo_secondary_role
- a rails service is enabled
-
geo_secondary['auto_migrate']
is truthy -
node['gitlab']['geo-postgresql']['enable']
<=== I think this should be removed
This differs from non-Geo DB migrations which doesn't check if postgresql is enabled: https://gitlab.com/gitlab-org/omnibus-gitlab/blob/12.3.1+ee.0/files%2Fgitlab-cookbooks%2Fgitlab%2Frecipes%2Fdatabase_migrations.rb#L71
This condition prevents Geo DB migrations during reconfigure in HA (since Rails and the Geo DB are not enabled on the same machine).
I think this is a bug because it doesn't match non-Geo reconfigure/migration behavior, and requires confusingly different instructions (manually running gitlab-rake geo:db:migrate
).
Proposal
Remove node['gitlab']['geo-postgresql']['enable']
condition from https://gitlab.com/gitlab-org/omnibus-gitlab/blob/12.3.1+ee.0/files/gitlab-cookbooks/gitlab-ee/recipes/geo_database_migrations.rb#L42