- 새 Geo 노드 만들기
 - 모든 Geo 노드에 대한 구성 검색
 - 특정 Geo 노드에 대한 구성 검색
 - Geo 노드 편집
 - Geo 노드 삭제
 - Geo 노드 수리
 - 특정 Geo 노드에 대한 상태 가져오기
 - 현재 노드에서 발생한 프로젝트 동기화 또는 확인 실패 사항 검색
 
Geo 노드 API (사용 중지)
Tier: Premium, Ultimate
Offering: Self-managed
Geo 노드 API는 GitLab 16.0에서 사용 중지되었으며 API의 v5에서 제거할 예정입니다. 대신 Geo 사이트 API를 사용하세요. 이 변경은 파괴적인 변경입니다.
Geo 노드 엔드포인트와 상호 작용하려면 자신을 관리자로 인증해야 합니다.
새 Geo 노드 만들기
새 Geo 노드를 생성합니다.
POST /geo_nodes
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://primary.example.com/api/v4/geo_nodes" \
     --request POST \
     -d "name=himynameissomething" \
     -d "url=https://another-node.example.com/"
| 속성 | 유형 | 필수여부 | 설명 | 
|---|---|---|---|
primary
 | boolean | no | 이 노드를 기본 노드로 지정할지 여부를 지정합니다. 기본값은 false입니다. | 
enabled
 | boolean | no | Geo 노드가 활성화되어 있는지 여부를 나타내는 플래그입니다. 기본값은 true입니다. | 
name
 | string | yes | Geo 노드의 고유 식별자입니다. gitlab.rb에 설정된 geo_node_name과 일치해야 하며, 그렇지 않으면 external_url과 일치해야 합니다.
 | 
url
 | string | yes | Geo 노드의 사용자 대상 URL입니다. | 
internal_url
 | string | no | 이 보조 노드가 사용해야 하는 기본 노드에서 정의된 URL입니다. 설정되지 않으면 url을 반환합니다.
 | 
files_max_capacity
 | integer | no | 이 보조 노드의 LFS/첨부 파일 백필의 최대 동시성을 제어합니다. 기본값은 10입니다. | 
repos_max_capacity
 | integer | no | 이 보조 노드의 리포지터리 백필의 최대 동시성을 제어합니다. 기본값은 25입니다. | 
verification_max_capacity
 | integer | no | 이 노드의 리포지터리 확인의 최대 동시성을 제어합니다. 기본값은 100입니다. | 
container_repositories_max_capacity
 | integer | no | 이 노드의 컨테이너 리포지터리 동기화의 최대 동시성을 제어합니다. 기본값은 10입니다. | 
sync_object_storage
 | boolean | no | 보조 Geo 노드가 Object Storage의 blob을 복제해야 하는지 여부를 나타내는 플래그입니다. 기본값은 false입니다. | 
selective_sync_type
 | string | no | 특정 그룹 또는 샤드에만 동기화를 제한합니다. 유효한 값: "namespaces", "shards", 또는 null.
 | 
selective_sync_shards
 | array | no | 
selective_sync_type이 shards인 경우 동기화되는 프로젝트의 리포지터리 스토리지입니다.
 | 
selective_sync_namespace_ids
 | array | no | 
selective_sync_type이 namespaces인 경우 동기화해야 하는 그룹의 ID입니다.
 | 
minimum_reverification_interval
 | integer | no | 리포지터리 확인이 유효한 간격(일)입니다. 만료되면 다시 확인됩니다. 이 속성은 보조 노드에서 설정되어 있어도 효과가 없습니다. | 
예시 응답:
{
  "id": 3,
  "name": "Test Node 1",
  "url": "https://secondary.example.com/",
  "internal_url": "https://secondary.example.com/",
  "primary": false,
  "enabled": true,
  "current": false,
  "files_max_capacity": 10,
  "repos_max_capacity": 25,
  "verification_max_capacity": 100,
  "selective_sync_type": "namespaces",
  "selective_sync_shards": [],
  "selective_sync_namespace_ids": [1, 25],
  "minimum_reverification_interval": 7,
  "container_repositories_max_capacity": 10,
  "sync_object_storage": false,
  "clone_protocol": "http",
  "web_edit_url": "https://primary.example.com/admin/geo/sites/3/edit",
  "web_geo_projects_url": "https://secondary.example.com/admin/geo/projects",
  "web_geo_replication_details_url": "https://secondary.example.com/admin/geo/sites/3/replication/lfs_objects",
  "_links": {
     "self": "https://primary.example.com/api/v4/geo_nodes/3",
     "status": "https://primary.example.com/api/v4/geo_nodes/3/status",
     "repair": "https://primary.example.com/api/v4/geo_nodes/3/repair"
  }
}
web_geo_projects_url 속성은 종료 단계에 있습니다. 이 속성은 GitLab 14.9에서 사용 중지됩니다.모든 Geo 노드에 대한 구성 검색
GET /geo_nodes
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://primary.example.com/api/v4/geo_nodes"
예시 응답:
[
  {
    "id": 1,
    "name": "us-node",
    "url": "https://primary.example.com/",
    "internal_url": "https://internal.example.com/",
    "primary": true,
    "enabled": true,
    "current": true,
    "files_max_capacity": 10,
    "repos_max_capacity": 25,
    "container_repositories_max_capacity": 10,
    "verification_max_capacity": 100,
    "selective_sync_type": "namespaces",
    "selective_sync_shards": [],
    "selective_sync_namespace_ids": [1, 25],
    "minimum_reverification_interval": 7,
    "clone_protocol": "http",
    "web_edit_url": "https://primary.example.com/admin/geo/sites/1/edit",
    "_links": {
      "self": "https://primary.example.com/api/v4/geo_nodes/1",
      "status":"https://primary.example.com/api/v4/geo_nodes/1/status",
      "repair":"https://primary.example.com/api/v4/geo_nodes/1/repair"
    }
  },
  {
    "id": 2,
    "name": "cn-node",
    "url": "https://secondary.example.com/",
    "internal_url": "https://secondary.example.com/",
    "primary": false,
    "enabled": true,
    "current": false,
    "files_max_capacity": 10,
    "repos_max_capacity": 25,
    "container_repositories_max_capacity": 10,
    "verification_max_capacity": 100,
    "selective_sync_type": "namespaces",
    "selective_sync_shards": [],
    "selective_sync_namespace_ids": [1, 25],
    "minimum_reverification_interval": 7,
    "sync_object_storage": true,
    "clone_protocol": "http",
    "web_edit_url": "https://primary.example.com/admin/geo/sites/2/edit",
    "web_geo_projects_url": "https://secondary.example.com/admin/geo/projects",
    "web_geo_replication_details_url": "https://secondary.example.com/admin/geo/sites/2/replication/lfs_objects",
    "_links": {
      "self":"https://primary.example.com/api/v4/geo_nodes/2",
      "status":"https://primary.example.com/api/v4/geo_nodes/2/status",
      "repair":"https://primary.example.com/api/v4/geo_nodes/2/repair"
    }
  }
]
web_geo_projects_url 속성은 종료 단계에 있습니다. 이 속성은 GitLab 14.9에서 사용 중지됩니다.특정 Geo 노드에 대한 구성 검색
GET /geo_nodes/:id
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://primary.example.com/api/v4/geo_nodes/1"
예시 응답:
{
  "id": 1,
  "name": "us-node",
  "url": "https://primary.example.com/",
  "internal_url": "https://primary.example.com/",
  "primary": true,
  "enabled": true,
  "current": true,
  "files_max_capacity": 10,
  "repos_max_capacity": 25,
  "container_repositories_max_capacity": 10,
  "verification_max_capacity": 100,
  "selective_sync_type": "namespaces",
  "selective_sync_shards": [],
  "selective_sync_namespace_ids": [1, 25],
  "minimum_reverification_interval": 7,
  "clone_protocol": "http",
  "web_edit_url": "https://primary.example.com/admin/geo/sites/1/edit",
  "_links": {
    "self": "https://primary.example.com/api/v4/geo_nodes/1",
    "status":"https://primary.example.com/api/v4/geo_nodes/1/status",
    "repair":"https://primary.example.com/api/v4/geo_nodes/1/repair"
  }
}
Geo 노드 편집
기존 Geo 노드의 설정을 업데이트합니다.
PUT /geo_nodes/:id
| 속성 | 유형 | 필수 여부 | 설명 | 
|---|---|---|---|
id
 | 정수 | 예 | Geo 노드의 ID입니다. | 
enabled
 | 부울 | 아니오 | Geo 노드가 활성화되어 있는지를 나타내는 플래그입니다. | 
name
 | 문자열 | 아니오 | Geo 노드의 고유 식별자입니다. gitlab.rb에서 설정되어 있으면 geo_node_name과 일치해야 하며, 그렇지 않으면 external_url과 일치해야 합니다.
 | 
url
 | 문자열 | 아니오 | Geo 노드의 사용자 관점의 URL입니다. | 
internal_url
 | 문자열 | 아니오 | 보조 노드가 연락할 주요 노드에서 정의된 URL입니다. 설정되지 않은 경우 url을 반환합니다.
 | 
files_max_capacity
 | 정수 | 아니오 | 이 보조 노드에 대한 LFS/첨부물 백필의 최대 동시성을 제어합니다. | 
repos_max_capacity
 | 정수 | 아니오 | 이 보조 노드에 대한 리포지터리 백필의 최대 동시성을 제어합니다. | 
verification_max_capacity
 | 정수 | 아니오 | 이 노드에 대한 확인의 최대 동시성을 제어합니다. | 
container_repositories_max_capacity
 | 정수 | 아니오 | 이 노드에 대한 컨테이너 리포지터리 동기화의 최대 동시성을 제어합니다. | 
sync_object_storage
 | 부울 | 아니오 | 보조 Geo 노드가 개체 리포지터리에 블롭을 복제해야 하는지를 나타내는 플래그입니다. | 
selective_sync_type
 | 문자열 | 아니오 | 특정 그룹이나 샤드에 대해서만 동기화를 제한합니다. 유효한 값: "namespaces", "shards", 또는 null.
 | 
selective_sync_shards
 | 배열 | 아니오 | 
selective_sync_type == shards인 경우 프로젝트가 동기화되는 리포지터리 스토리지입니다.
 | 
selective_sync_namespace_ids
 | 배열 | 아니오 | 
selective_sync_type == namespaces인 경우 동기화되어야 하는 그룹의 ID입니다.
 | 
minimum_reverification_interval
 | 정수 | 아니오 | 리포지터리 검증이 유효한 간격(일 단위)입니다. 만료되면 다시 확인됩니다. 이 값은 보조 노드에 설정되지 않습니다. | 
예시 응답:
{
  "id": 1,
  "name": "cn-node",
  "url": "https://secondary.example.com/",
  "internal_url": "https://secondary.example.com/",
  "primary": false,
  "enabled": true,
  "current": true,
  "files_max_capacity": 10,
  "repos_max_capacity": 25,
  "container_repositories_max_capacity": 10,
  "verification_max_capacity": 100,
  "selective_sync_type": "namespaces",
  "selective_sync_shards": [],
  "selective_sync_namespace_ids": [1, 25],
  "minimum_reverification_interval": 7,
  "sync_object_storage": true,
  "clone_protocol": "http",
  "web_edit_url": "https://primary.example.com/admin/geo/sites/2/edit",
  "web_geo_projects_url": "https://secondary.example.com/admin/geo/projects",
  "web_geo_replication_details_url": "https://secondary.example.com/admin/geo/sites/2/replication/lfs_objects",
  "_links": {
    "self":"https://primary.example.com/api/v4/geo_nodes/2",
    "status":"https://primary.example.com/api/v4/geo_nodes/2/status",
    "repair":"https://primary.example.com/api/v4/geo_nodes/2/repair"
  }
}
web_geo_projects_url 속성은 종료 단계에 있습니다. 폐기 예정
으로 GitLab 14.9에서 사용되지 않습니다.Geo 노드 삭제
Geo 노드를 제거합니다.
DELETE /geo_nodes/:id
| 속성 | 유형 | 필수 여부 | 설명 | 
|---|---|---|---|
id
 | 정수 | 예 | Geo 노드의 ID입니다. | 
Geo 노드 수리
Geo 노드의 OAuth 인증을 수리합니다.
이는 주 Geo 노드에서만 실행할 수 있습니다.
POST /geo_nodes/:id/repair
예시 응답:
{
  "id": 1,
  "name": "us-node",
  "url": "https://primary.example.com/",
  "internal_url": "https://primary.example.com/",
  "primary": true,
  "enabled": true,
  "current": true,
  "files_max_capacity": 10,
  "repos_max_capacity": 25,
  "container_repositories_max_capacity": 10,
  "verification_max_capacity": 100,
  "clone_protocol": "http",
  "web_edit_url": "https://primary.example.com/admin/geo/sites/1/edit",
  "_links": {
    "self":"https://primary.example.com/api/v4/geo_nodes/1",
    "status":"https://primary.example.com/api/v4/geo_nodes/1/status",
    "repair":"https://primary.example.com/api/v4/geo_nodes/1/repair"
  }
}
모든 Geo 노드에 대한 상태 검색
GET /geo_nodes/status
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://primary.example.com/api/v4/geo_nodes/status"
예시 응답:
[
  {
    "geo_node_id": 1,
    "healthy": true,
    "health": "Healthy",
    "health_status": "Healthy",
    "missing_oauth_application": false,
    "db_replication_lag_seconds": null,
    ... (중략) ...
  },
  {
    "geo_node_id": 2,
    "healthy": true,
    "health": "Healthy",
    "health_status": "Healthy",
    "missing_oauth_application": false,
    "db_replication_lag_seconds": 0,
    ... (중략) ...
  }
]
특정 Geo 노드에 대한 상태 가져오기
GET /geo_nodes/:id/status
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://primary.example.com/api/v4/geo_nodes/2/status"
예시 응답:
{
  "geo_node_id": 2,
  "healthy": true,
  "health": "Healthy",
  "health_status": "Healthy",
  "missing_oauth_application": false,
  "db_replication_lag_seconds": 0,
  "lfs_objects_count": 5,
  "lfs_objects_checksum_total_count": 5,
  ...
  "project_repositories_verified_in_percentage": "100.00%"
}
health_status 매개변수는 “Healthy” 또는 “Unhealthy” 상태여야 하며, health 매개변수는 비어 있거나 “Healthy”이거나 실제 오류 메시지를 포함할 수 있습니다.현재 노드에서 발생한 프로젝트 동기화 또는 확인 실패 사항 검색
이 기능은 보조 노드에서만 작동합니다.
GET /geo_nodes/current/failures
| 속성 | 유형 | 필수 | 설명 | 
|---|---|---|---|
type
 | string | 아니요 | 실패한 객체의 유형 (repository/wiki)
 | 
failure_type
 | string | 아니요 | 실패 유형 (sync/checksum_mismatch/verification)
 | 
이 엔드포인트는 페이지 네이션을 사용합니다.
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://primary.example.com/api/v4/geo_nodes/current/failures"
응답 예시:
[
  {
    "project_id": 3,
    "last_repository_synced_at": "2017-10-31 14:25:55 UTC",
    "last_repository_successful_sync_at": "2017-10-31 14:26:04 UTC",
    "last_wiki_synced_at": "2017-10-31 14:26:04 UTC",
    "last_wiki_successful_sync_at": "2017-10-31 14:26:11 UTC",
    "repository_retry_count": null,
    "wiki_retry_count": 1,
    "last_repository_sync_failure": null,
    "last_wiki_sync_failure": "Error syncing Wiki repository",
    "last_repository_verification_failure": "",
    "last_wiki_verification_failure": "",
    "repository_verification_checksum_sha": "da39a3ee5e6b4b0d32e5bfef9a601890afd80709",
    "wiki_verification_checksum_sha": "da39a3ee5e6b4b0d3255bfef9ef0189aafd80709",
    "repository_checksum_mismatch": false,
    "wiki_checksum_mismatch": false
  }
]
도움말