Skip to main content
Skip to content

Git replication out of sync because of a retired node

A node that is no longer in your high availability configuration may still be registered as a Git server. If ghe-repl-status reports that Git replication is out of sync, you can confirm and remove the stale record.

Symptoms

On a replica, ghe-repl-status reports that Git replication is out of sync or behind. For more information, see 고가용성 구성 모니터링.

Causes

Each node has a universally unique identifier (UUID) and is registered as a Git server named git-server-UUID. Git replication tries to keep repositories in sync on every registered Git server.

If a node leaves the high availability configuration, its Git server record may remain. In that case, replication keeps trying to sync repositories to that Git server. ghe-repl-status then reports replication as behind.

This can happen if:

  • A node is removed from the configuration without decommissioning its UUID. This can happen after a failover.
  • A backup restore to a new appliance fails before ghe-restore removes the stale records.

Confirming the problem

  1. Connect to the primary's administrative shell using Secure Shell (SSH). For more information, see 관리 셸(SSH)에 액세스.

  2. List the registered Git servers. Note the UUID after git-server- in each row.

    ghe-spokesctl server show
    
  3. Run the following command on the primary and every replica in the configuration to get each node's UUID.

    cat /data/user/common/uuid
    
  4. Compare the two lists. A Git server record is stale if its UUID does not match any current node's UUID.

Before you remove a stale record, make sure the node is permanently retired. All of the following must be true:

  • The node is not the primary.
  • The node is not part of the active configuration.
  • You do not plan to reattach the node.

A rebuilt appliance can have a new UUID even if you reuse the same virtual machine.

An unreachable appliance, or a node missing from the configuration, is not enough on its own to prove that the node is retired.

Resolving the problem

This procedure removes the record for a permanently retired node. To remove a replica that is still reachable and configured, follow the replica removal procedure instead. See 고가용성 복제본 제거.

경고

Removing a node's UUID deletes the node's database entries. Never remove the primary or a replica you still need.

On versions 3.18 and later, use ghe-repl-decommission only after a successful failover or with guidance from GitHub 지원.

Schedule a change window before you begin.

  1. Take a backup of GitHub Enterprise Server 인스턴스. For more information, see 백업 만들기 및 모니터링.

  2. If the former appliance still exists, shut it down or delete it, so it can't reconnect later.

  3. Connect to the primary's administrative shell using SSH.

  4. Double-check that the UUID you identified belongs to the retired node. The UUID must not include the git-server- prefix.

  5. Remove the retired node. Replace UUID with the UUID you confirmed.

    If you're running 3.18 or later, use ghe-repl-decommission and confirm when prompted. For more information, see 명령줄 유틸리티.

    ghe-repl-decommission UUID
    

    On earlier releases, use ghe-repl-teardown with the -u option. It can start removal without asking for confirmation. From 3.18, ghe-repl-teardown no longer supports -u.

    ghe-repl-teardown -u UUID
    

    ghe-repl-decommission refuses the current node and any UUID that is still in the active configuration. If either removal command refuses the UUID or reports an error, stop. Don't try to work around it. See Contacting GitHub 지원.

  6. On the primary, list the Git servers again. Confirm that only the retired node was removed.

    ghe-spokesctl server show
    

    If the retired node is still listed, or a current node is missing, stop. Don't run the removal command again. See Contacting GitHub 지원.

  7. On each replica, check replication status.

    ghe-repl-status -vv
    

Removing a stale record doesn't guarantee that other checksum, copy, or cleanup warnings will clear. If warnings remain, contact GitHub 지원 before making any other change.

Preventing recurrence

After a successful failover, decommission the UUID of each appliance that you have permanently retired and don't plan to reattach. For more information, see 복제본 어플라이언스로 장애 조치(failover) 시작.

Contacting GitHub 지원

Contact GitHub 지원 rather than continuing if any of the following apply:

  • The command refuses the UUID or reports an error.
  • The Git server list is wrong after you remove the record.
  • Replication warnings remain after you remove the record.
  • You are unsure whether a node is retired.

For more information, see 지원 티켓 만들기.

When you open a ticket, include the output of ghe-repl-status -vv from each replica. Attaching a support bundle also helps GitHub 지원 diagnose the problem faster. For more information, see GitHub 지원에 데이터 제공.

Further reading