Geo: instructions to update FDW schema aren't entirely correct
When the FDW schema is outdated, rake gitlab:geo:check
gives this:
# sudo gitlab-rake gitlab:geo:check
Checking Geo ...
GitLab Geo is available ... yes
GitLab Geo is enabled ... yes
GitLab Geo secondary database is correctly configured ... yes
Database replication enabled? ... yes
Database replication working? ... yes
GitLab Geo tracking database is configured to use Foreign Data Wrapper? ... yes
GitLab Geo tracking database Foreign Data Wrapper schema is up-to-date? ... no
Try fixing it:
Follow Geo setup instructions to configure secondary nodes with FDW support
If you upgraded recently check for any new step required to enable FDW
If you are using Omnibus GitLab try running:
gitlab-ctl reconfigure
If installing from source, try running:
bundle exec rake geo:db:refresh_foreign_tables
For more information see:
doc/gitlab-geo/database.md
GitLab Geo HTTP(S) connectivity ...
* Can connect to the primary node ... yes
HTTP/HTTPS repository cloning is enabled ... yes
Machine clock is synchronized ... yes
Git user has default SSH configuration? ... yes
OpenSSH configured to use AuthorizedKeysCommand ... yes
GitLab configured to disable writing to authorized_keys file ... yes
GitLab configured to store new projects in hashed storage? ... yes
All projects are in hashed storage? ... yes
Checking Geo ... Finished
I don't think a full reconfigure
is needed. I rather tell the user to run gitlab-rake geo:db:refresh_foreign_tables
.
Also we no longer support source installs, so the bundle exec rake geo:db:refresh_foreign_tables
command can be removed.
The "Follow Geo setup instructions to configure secondary nodes with FDW support" instruction do not fit under outdated schema, they only apply when FDW was not set up.
And maybe it's also better to point them to the troubleshooting page: https://docs.gitlab.com/ee/administration/geo/replication/troubleshooting.html#geo-database-has-an-outdated-fdw-remote-schema-error (full URL).
Proposed output
# sudo gitlab-rake gitlab:geo:check
Checking Geo ...
GitLab Geo is available ... yes
GitLab Geo is enabled ... yes
GitLab Geo secondary database is correctly configured ... yes
Database replication enabled? ... yes
Database replication working? ... yes
GitLab Geo tracking database is configured to use Foreign Data Wrapper? ... yes
GitLab Geo tracking database Foreign Data Wrapper schema is up-to-date? ... no
Run the following command to refresh the FDW schema:
gitlab-rake geo:db:refresh_foreign_tables
For more information see:
https://docs.gitlab.com/ee/administration/geo/replication/troubleshooting.html#geo-database-has-an-outdated-fdw-remote-schema-error
GitLab Geo HTTP(S) connectivity ...
* Can connect to the primary node ... yes
HTTP/HTTPS repository cloning is enabled ... yes
Machine clock is synchronized ... yes
Git user has default SSH configuration? ... yes
OpenSSH configured to use AuthorizedKeysCommand ... yes
GitLab configured to disable writing to authorized_keys file ... yes
GitLab configured to store new projects in hashed storage? ... yes
All projects are in hashed storage? ... yes
Checking Geo ... Finished