AI 에이전트의 경우: 문서 인덱스는 https://www.mongodb.com/ko-kr/docs/llms.txt에서 사용할 수 있으며, 모든 페이지의 마크다운 버전은 어떤 URL 경로에 .md를 추가하여 사용할 수 있습니다.

프로세스의 수명주기를 관리하세요

Ops Manager API를 사용하여 MongoDB 프로세스를 종료, 시작, 재시작 및 재동기화할 수 있습니다. 이러한 작업은 다운타임을 시뮬레이션하거나 계획된 유지 보수 재시작을 위한 복원력 테스트 중에 유용합니다. 또한 장시간 종료 후 동기화가 너무 늦어진 멤버를 재동기화할 수도 있습니다.

요청을 보내면 Ops Manager는 해당 호스트에서 실행 중인 자동화 에이전트에 MongoDB 프로세스를 종료, 시작, 재시작 또는 재동기화하도록 즉시 지시합니다. 에이전트는 Ops Manager와의 다음 체크인 시 변경 사항을 적용합니다. 프로세스가 현재 기본 프로세스인 경우, 에이전트는 먼저 다른 멤버가 인계받을 수 있도록 프로세스를 단계적으로 종료한 다음 중지하거나 재시작합니다.

  • Each operation is asynchronous. A 200 OK response means Ops Manager published the change, not that the process has stopped, started, restarted, or resynced. The response includes no job ID. To follow the change to completion, poll the automation status resource. If the agent can't apply the change, the plan shows as failed there and the agent keeps retrying.

  • Every endpoint accepts an optional dryRun=true query parameter. Use it to preview a change before you apply it. Ops Manager runs all the same checks and returns the process document as it would look after the change, but sends nothing to the agent and changes nothing in your deployment. For example, after a shutdown the returned document contains "disabled": true. Review it, then send the same request without dryRun=true to apply the change.

  • Your deployment must run Ops Manager 8.0.28 or 9.0.2 or later.

  • 프로젝트에 자동화 기능이 활성화되어 있어야 하며, 대상 호스트의 자동화 에이전트가 실행 중이어야 합니다.

  • 프로젝트에 게시되지 않은 자동화 구성 초안이 있는 경우 Ops Manager는 드라이 런을 포함한 모든 요청을 거부합니다. 계속 진행하기 전에 초안을 게시하거나 삭제하십시오.

  • You must have the Project Automation Admin role.

  • 이러한 엔드포인트는 외부에서 관리되는 프로젝트 또는 Kubernetes Operator(MCK) 배포를 지원하지 않습니다.

경고

이러한 엔드포인트는 쿼럼 보호 기능을 제공하지 않습니다. 복제 세트의 구성원을 너무 많이 종료하면 기본 서버가 없어지게 됩니다. 구성원을 한 번에 하나씩 종료하고 각 구성원이 완전히 종료될 때까지 기다린 후 다음 단계로 진행하십시오.

이 절차는 실행 중인 프로세스를 안전하게 종료합니다.

1

Find the hostname:port of the process in the Ops Manager UI or with the v2.0 Get All Hosts endpoint.

2
curl --user "{PUBLIC-KEY}:{PRIVATE-KEY}" --digest \ --header "Accept: application/json" \ --include \ --request POST "https://<OpsManagerHost>:<Port>/api/public/v1.0/groups/{GROUP-ID}/process/{HOST-PORT}:shutdown?pretty=true&dryRun=true"
3

Remove dryRun=true from the request. Ops Manager returns 200 OK with the process document, now with "disabled": true.

4

Poll the automation status resource until the process's lastGoalVersionAchieved equals the plan's goalVersion.

다음 표는 Ops Manager가 특정 시나리오에서 종료 요청을 처리하는 방법을 설명합니다.

Scenario
행동

타겟은 현재 주요 목표입니다.

담당자는 작동을 멈추기 전에 단계를 낮춥니다.

타겟은 이미 문을 닫았습니다.

프로세스에는 변경 사항이 없습니다. 에이전트는 아무런 조치를 취하지 않지만, Ops Manager는 여전히 구성을 게시하고 이벤트를 기록합니다.

대상이 수동 모드입니다

Ops Manager rejects the request with 400. You cannot shut down a manual-mode process through automation.

이 절차는 이전에 종료되었던 프로세스를 다시 시작합니다.

1

Find the hostname:port of the process in the Ops Manager UI or with the v2.0 Get All Hosts endpoint.

2
curl --user "{PUBLIC-KEY}:{PRIVATE-KEY}" --digest \ --header "Accept: application/json" \ --include \ --request POST "https://<OpsManagerHost>:<Port>/api/public/v1.0/groups/{GROUP-ID}/process/{HOST-PORT}:startup?pretty=true&dryRun=true"
3

Remove dryRun=true from the request. Ops Manager returns 200 OK with the process document, now with "disabled": false.

4

Poll the automation status resource until the plan completes. Then confirm that the member's replicaStateName on the v2.0 Get One Host by ID endpoint returns to SECONDARY or PRIMARY.

다음 표는 Ops Manager가 특정 시나리오에서 시작 요청을 처리하는 방법을 설명합니다.

Scenario
행동

타겟이 이미 실행 중입니다.

프로세스에는 변경 사항이 없습니다. 에이전트는 아무런 조치를 취하지 않지만, Ops Manager는 여전히 구성을 게시하고 이벤트를 기록합니다.

프로세스가 중단된 동안 oplog가 롤오버되었습니다.

The member starts and stays in RECOVERING and doesn't resync automatically. Resync the process instead.

이 절차는 실행 중인 프로세스를 정상적으로 재시작합니다. 대상이 현재 기본 프로세스인 경우, 에이전트는 재시작하기 전에 해당 프로세스를 단계적으로 종료합니다.

1

Find the hostname:port of the process in the Ops Manager UI or with the v2.0 Get All Hosts endpoint.

2
curl --user "{PUBLIC-KEY}:{PRIVATE-KEY}" --digest \ --header "Accept: application/json" \ --include \ --request POST "https://<OpsManagerHost>:<Port>/api/public/v1.0/groups/{GROUP-ID}/process/{HOST-PORT}:restart?pretty=true&dryRun=true"
3

Remove dryRun=true from the request. Ops Manager returns 200 OK with the process document, now with lastRestart set.

4

계획이 완료될 때까지 자동화 상태 리소스를 폴링합니다.

다음 표는 Ops Manager가 특정 시나리오에서 재시작 요청을 처리하는 방법을 설명합니다.

Scenario
행동

타겟 매장이 문을 닫았습니다.

Ops Manager rejects the request with 400 PROCESS_DISABLED_CANNOT_RESTART. Start the process instead.

대상 호스트의 에이전트가 운영 관리자에게 보고한 적이 없습니다.

Ops Manager rejects the request with 409 PROCESS_AGENT_NOT_REPORTING.

This procedure triggers an initial sync on a replica set member. Use it to recover a member stuck in RECOVERING because it fell behind the oplog window.

1

Find the hostname:port of the process in the Ops Manager UI or with the v2.0 Get All Hosts endpoint.

2
curl --user "{PUBLIC-KEY}:{PRIVATE-KEY}" --digest \ --header "Accept: application/json" \ --include \ --request POST "https://<OpsManagerHost>:<Port>/api/public/v1.0/groups/{GROUP-ID}/process/{HOST-PORT}:resync?pretty=true&dryRun=true"
3

Remove dryRun=true from the request. Ops Manager returns 200 OK with the process document, now with lastResync set.

4

Poll the automation status resource until the plan completes. Then poll v2.0 Get One Host by ID until replicaStateName is SECONDARY. The initial sync can take a long time on large data sets.

다음 표는 Ops Manager가 특정 시나리오에서 재동기화 요청을 처리하는 방법을 설명합니다.

Scenario
행동

The target is a mongos, a standalone, or an arbiter

Ops Manager rejects the request with 400 PROCESS_RESYNC_NOT_SUPPORTED. You can resync only data-bearing replica set members.

복제 세트의 다른 멤버도 이미 재동기화가 진행 중입니다.

Ops Manager rejects the request with 409 PROCESS_RESYNC_IN_PROGRESS, including dry runs. Wait for the deployment to reach goal state, then retry.

목표는 현재 주요 사항입니다.

Ops Manager returns 200 OK, but the Automation Agent doesn't resync a primary. The plan stays pending with the message A resync was requested on a primary. This requires manual intervention. The member keeps running as primary.

대상 호스트의 에이전트가 운영 관리자에게 보고한 적이 없습니다.

Ops Manager rejects the request with 409 PROCESS_AGENT_NOT_REPORTING.

성공적인 요청(드라이런 제외)은 일반적인 자동화 구성 게시 이벤트와 함께 프로젝트 활동 피드에 이벤트를 하나씩 추가합니다. 활동 피드는 API를 통해 이루어진 요청을 공개 API에 대한 속성으로 표시합니다.

작업
이벤트 유형
얼마나 많은 정보를 제공하는지

종료

AUTOMATION_PROCESS_SHUTDOWN_REQUESTED

이 프로세스에 대한 종료 요청이 있었습니다. 구성원이 예기치 않게 오프라인 상태가 된 경우 이 이벤트를 확인하십시오.

시작하기

AUTOMATION_PROCESS_STARTUP_REQUESTED

중단된 프로세스를 재개해달라는 요청이 있었습니다.

다시 시작

AUTOMATION_PROCESS_RESTART_REQUESTED

이 프로세스에 대한 재시작 요청이 있었습니다. 구성원이 일시적으로 탈퇴했거나 선거가 진행된 경우 이 이벤트를 확인하십시오.

재동기화

AUTOMATION_PROCESS_RESYNC_REQUESTED

A resync request was made for this process. Check this event if a member went into STARTUP2 or RECOVERING and is re-copying data.

다음 표는 프로세스 수명 주기 엔드포인트를 사용할 때 발생하는 일반적인 오류 및 증상을 설명합니다.

증상
가능한 원인
해상도

409 AUTOMATION_CONFIG_DRAFT_ALREADY_EXISTS

프로젝트에 게시되지 않은 자동화 구성 초안이 있습니다.

초안을 게시하거나 삭제한 다음 다시 시도하세요.

409 AUTOMATION_CONFIG_CONCURRENT_MODIFICATION

누군가 Ops Manager가 구성을 읽고 게시하는 사이에 변경 사항을 게시했습니다.

요청을 다시 시도하세요.

409 GROUP_IN_RESTORATION_MODE

복원 후 프로젝트가 정상 작동 상태로 돌아가고 있습니다.

조정 작업이 완료될 때까지 기다린 후 다시 시도하십시오.

409 PROCESS_AGENT_NOT_REPORTING

대상 호스트의 에이전트가 Ops Manager에 보고한 적이 없습니다.

에이전트가 설치되어 실행 중이고 Ops Manager에 연결할 수 있는지 확인한 후 다시 시도하십시오.

403 PROCESS_EXTERNALLY_MANAGED

프로젝트 진행 과정은 외부 시스템에 의해 관리됩니다.

이러한 엔드포인트는 외부에서 관리되는 프로젝트에는 적용되지 않습니다.

404 PROCESS_NOT_FOUND

hostname:port 프로젝트 자동화 구성의 프로세스와 일치하지 않습니다.

Confirm the value with v2.0 Get All Hosts, then retry.

400 PROCESS_DISABLED_CANNOT_RESTART

해당 프로세스가 종료되었습니다.

대신 시작 엔드포인트를 호출하세요.

409 PROCESS_RESYNC_IN_PROGRESS

이 복제 세트에 대한 재동기화가 이미 요청되었지만 배포가 아직 목표 상태에 도달하지 않았습니다. 예를 들어 기본 서버에서 요청된 재동기화가 중단되면 새로운 요청이 계속 차단됩니다.

계획이 완료될 때까지 자동화 상태 리소스를 주기적으로 확인한 후 다시 시도하십시오.

400 PROCESS_RESYNC_NOT_SUPPORTED

The target is a mongos, a standalone, or an arbiter, which have no data to sync.

대신 데이터가 있는 복제 세트 멤버를 다시 동기화하십시오.

400 INVALID_QUERY_PARAMETER

dryRun isn't true or false, including an empty value. For example, dryRun=tru or dryRun=.

값을 수정하거나 매개변수를 생략하세요.

재동기화 후 자동화 상태에 수동 개입이 필요하다고 표시됩니다.

기본 서버에서 재동기화가 요청되었습니다.

기본 설정을 낮추어 재동기화를 차단 해제하세요.

계획이 자동화 상태에서 계속 실패합니다.

예를 들어 호스트에 연결할 수 없기 때문에 에이전트가 변경 사항을 적용할 수 없습니다.

자동화 상태 응답에서 프로세스 오류를 검토하고 원인을 수정하십시오. 그러면 에이전트가 다시 시도합니다.

Member stays in RECOVERING after startup

프로세스가 중단된 동안 oplog가 롤백되어 해당 멤버가 따라잡을 수 없었습니다.

Resync the process, then check replicaStateName on the host until it is SECONDARY.