Protocells: POC of "Org Migration Target Cell" mode

Problem/Proposal

We had a couple ideas for how to use Geo mostly as-is for migrating data to a Protocell. (See Meeting Notes below.)

In this issue, we should do a POC of the Protocells mode idea.

Meeting notes

From Notes - Org Data Migration - Sync/Office Hours:

Sep 18, 2025 | [REC] Org Data Migration Sync

  1. Michael Kozono: Geo will probably need some modifications to configure a Protocell as a secondary site while the Protocell is a live, writable site at the same time. I haven’t looked at specifically what modifications will be needed and how much work that will be. I think I need to do a POC locally.
    1. Michael Kozono There was the idea to run Rails processes on the side that have different configuration (configured as Geo secondary site)
    2. Douglas Alexandre What about Protocells mode, distinct from primary and secondary site. Runs all Geo jobs
      1. Michael Kozono What about just normal jobs + Geo secondary site jobs?
      2. Douglas Alexandre I think it’s fine to run the primary checksum jobs
    3. Douglas Alexandre We need to modify CronManager
    4. Douglas Alexandre Need to deploy tracking DB
    5. Douglas Alexandre Geo Health status. Not streaming replication, logical replication.

Plan

Partially configure Geo. (Protocell to act as secondary Geo site of Legacy Cell without any PG replication and without breaking anything.) Fix/bandaid things along the way, potentially introduce a third type of Geo site: Protocells mode. Stop at timebox of 2 days.

  • Legacy Cell: Set geo_node_name
  • Legacy Cell: rake geo:set_primary_node
  • Legacy Cell: In UI, add a secondary site with the Protocell attributes
  • Legacy Cell: Dump geo_nodes table
  • Protocell: Set geo_node_name
  • Protocell: Insert geo_nodes rows

Replicate org 1. Bandaid things along the way. Stop at timebox of 2 days.

  • Legacy Cell: Block org 1 users
  • Legacy Cell: Set selective sync by org 1 (starts checksumming non-PG data)
  • Legacy Cell: Dump PG data for org 1
  • Protocell: Insert PG data for org 1
  • Protocell: Set selective sync by org 1
  • Wait for replication of non-PG data

Ideas

Protocells mode would be relevant at call sites of Gitlab::Geo.primary? and Gitlab::Geo.secondary? . We could add Gitlab::Geo.protocell?.

POC Result

Video walkthrough

Walkthrough the GDK POC of Organization Replication across Cells: https://www.youtube.com/watch?v=SIclVXPJ7qc

(Eventually the script can evolve into "Organization Migration", but cutover is excluded for now.)

Async demo

  1. Stop other GDKs

  2. Run:

    curl -fsSL "https://gitlab.com/gitlab-org/gitlab-development-kit/-/raw/mk/gdk-org-configure-replication/support/cells/org-migration-install" | bash

Result:

INFO: Organization Migration POC Verification
INFO: https://gitlab.com/gitlab-org/gitlab-development-kit/-/merge_requests/5555

[2026-02-02 17:49:18] Validating inputs...
[2026-02-02 17:49:18]   GDK_BRANCH: mk/gdk-org-configure-replication
[2026-02-02 17:49:18]   GITLAB_BRANCH: mk/org-migration-target
[2026-02-02 17:49:18]   ORG_ID: 1000
[2026-02-02 17:49:18]   WORK_DIR: /tmp/org-migration-test
[2026-02-02 17:49:18]   GDK_PRIMARY_DIR_NAME: gdk
Phase 1: Installing primary GDK
[2026-02-02 17:49:18]   Cloning GDK with branch: mk/gdk-org-configure-replication
Cloning into '/tmp/org-migration-test/gdk'...
remote: Enumerating objects: 71665, done.

Copy to clipboard

... and after a long time, like an hour or two? ...

                          Replication Status
--------------------------------------------
                CI Secure Files replicated: succeeded 0 / total 0 (0%)
         Dependency Proxy Blobs replicated: succeeded 0 / total 0 (0%)
     Dependency Proxy Manifests replicated: succeeded 0 / total 0 (0%)
 Design Management Repositories replicated: succeeded 0 / total 0 (0%)
        Group Wiki Repositories replicated: succeeded 0 / total 0 (0%)
               CI Job Artifacts replicated: succeeded 0 / total 0 (0%)
                    LFS Objects replicated: succeeded 0 / total 0 (0%)
            Merge Request Diffs replicated: succeeded 32 / total 32 (100%)
                  Package Files replicated: succeeded 0 / total 0 (0%)
              Pages Deployments replicated: succeeded 0 / total 0 (0%)
             Pipeline Artifacts replicated: succeeded 0 / total 0 (0%)
           Project Repositories replicated: succeeded 3 / total 3 (100%)
      Project Wiki Repositories replicated: succeeded 3 / total 3 (100%)
           Snippet Repositories replicated: succeeded 2 / total 2 (100%)
       Terraform State Versions replicated: succeeded 0 / total 0 (0%)
                        Uploads replicated: succeeded 0 / total 0 (0%)

                         Verification Status
--------------------------------------------
                  CI Secure Files verified: succeeded 0 / total 0 (0%)
           Dependency Proxy Blobs verified: succeeded 0 / total 0 (0%)
       Dependency Proxy Manifests verified: succeeded 0 / total 0 (0%)
   Design Management Repositories verified: succeeded 0 / total 0 (0%)
          Group Wiki Repositories verified: succeeded 0 / total 0 (0%)
                 CI Job Artifacts verified: succeeded 0 / total 0 (0%)
                      LFS Objects verified: succeeded 0 / total 0 (0%)
              Merge Request Diffs verified: succeeded 0 / total 32 (0%)
                    Package Files verified: succeeded 0 / total 0 (0%)
                Pages Deployments verified: succeeded 0 / total 0 (0%)
               Pipeline Artifacts verified: succeeded 0 / total 0 (0%)
             Project Repositories verified: succeeded 0 / total 3 (0%)
        Project Wiki Repositories verified: succeeded 0 / total 3 (0%)
             Snippet Repositories verified: succeeded 0 / total 2 (0%)
         Terraform State Versions verified: succeeded 0 / total 0 (0%)
                          Uploads verified: succeeded 0 / total 0 (0%)
COMPLETE
✅️ Replication complete!

[2026-02-02 16:07:37] ===============================================
[2026-02-02 16:07:37] SUCCESS: Organization migration POC verified!
[2026-02-02 16:07:37] ===============================================
Edited Feb 04, 2026 by Michael Kozono
Assignee Loading
Time tracking Loading