Fix the Geo lifecycle defects found on 19.6.1

Wrong: on a 19.6.1 Geo pair, bring-primary-back failed when the replicate tool's closing gitlab-ctl start timed out on gitlab-kas, and a rerun then failed its own primary check because roles were already swapped. registry-migrate never recorded the mode, prefer-probe ran against a populated database and left 'enabled' => 'prefer' behind, preflight called a 429 a missing permission, and the seed disabled builds.

Change: one geo_tolerate_closing_start serves attach and bring-back; a bring_back_swapped state flag lets a rerun resume and clears on success. Migrate records database, prefer-probe empties the registry database and edits through the detached runner with a restore on return, preflight retries 429 and 5xx then says the permission could not be read, the seed passes builds_access_level=enabled, and geo.md states what restore returns.

flowchart TD
  A[bring-primary-back] --> B{bring_back_swapped?}
  B -- yes --> D[resume from swapped state]
  B -- no --> C[check promoted, swap roles, set flag]
  C --> D
  D --> E[replicate]
  E -- closing start timeout --> F[tolerate]
  F --> G[assert standby, clear flag]
  E -- ok --> G

Test: each item has a selftest check that fails before and passes after (engine and preflight selftests). Word budget 40484, unchanged. No live rig; the release's four-lane rerun is the live proof.

Closes #75

Merge request reports

Loading
Loading