Skip to content

Quick fix for geo-install and geo-add-secondary

Michael Kozono requested to merge mk/fix-geo-add-secondary into main

What does this merge request do and why?

Fixes the Geo install scripts. These are critical for development.

I don't know the root cause behind the strange behavior of executing shell commands from the Ruby script. This MR is intended to be a band-aid to get it functional enough for developers to use until we figure out what's wrong.

It switches to reusing Shellout because I already did that work in hopes that it would help. It does not, but we should continue with that change anyway.

Resolves #1657 (closed) and #1479 (closed)

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Follow https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/geo.md#easy-installation, but during step 3, use curl "https://gitlab.com/gitlab-org/gitlab-development-kit/-/raw/mk/fix-geo-add-secondary/support/geo-install" | bash -s gdk-a gdk-b mk/fix-geo-add-secondary (replacing gdk-a and gdk-b with whatever dir names you want).
  2. The script will fail on the bin/rake gitlab:geo:check command, but it's not necessary for configuration, and it works when run manually outside of the script.
  3. I needed to manually gdk restart the secondary site, I am not sure why, since the script did restart both GDKs before failing on the check commands.
  4. Visiting http://127.0.0.1:3001 succeeds. The logs show that requests are forwarded through the secondary site to the primary site, as is expected for a properly configured unified URL.

I will open a follow up issue for the remaining non-critical problems 2. and 3. above.

Note that geo-install and geo-add-secondary are idempotent-ish, so in general it's fine to retry if it breaks and then you resolve some underlying problem. You may not need to delete everything and start over from scratch.

Impacted categories

The following categories relate to this merge request:

Merge request checklist

  • This change is backward compatible. If not, please include steps to communicate to our users.
  • Tests added for new functionality. If not, please raise an issue to follow-up.
  • [-] Documentation added/updated, if needed.
  • gdk doctor test added, if needed.
  • Add the ~highlight label if this MR should be included in the CHANGELOG.md.
Edited by Michael Kozono

Merge request reports

Loading