FEATURE: Add cluster start, stop, delete, list, status commands - #47
Conversation
| return err | ||
| } | ||
|
|
||
| for host := range groupByHost(topo.Servers) { |
There was a problem hiding this comment.
다른 클러스터에서 동일한 버전의 파일을 기반으로 arcus memcached 서버가 구동되어 있으면 어떻게 처리하게 되나요?
There was a problem hiding this comment.
@namsic
cluster delete 명령에 수정사항이 있어 확인해주시면 감사하겠습니다.
기존에는 같은 path + version 을 공유하는 클러스터가 있을 때, 삭제 수행 시 다른 클러스터의 설치 디렉토리까지 삭제를 하는 문제가 있었습니다.
이를 해결하기 위해 삭제 동작을 아래와 같이 변경하였습니다.
-
기본
delete는 디렉토리 삭제를 하지 않음- ZNode와 내부 메타데이터만 제거하고, 설치 디렉토리는 유지
- 따라서 같은 경로를 공유하는 클러스터가 존재하더라도 문제가 되지 않음
-
디렉토리까지 지우기 위해서는
--purge옵션 사용- 명령어:
arcusctl cluster delete <servicecode> --purge - 내부 저장소(
~/.arcusctl)의 다른 클러스터들의 meta, topology 순회 - 그 중 동일한
path+version을 사용하는 클러스터가 있으면 디렉토리 삭제를 건너뜀 - 공유하는 클러스터가 없을 때만 디렉토리 삭제 진행
- 명령어:
프로세스 확인 기준으로 했을 경우에 stop만 하고 아직 삭제하지 않은 다른 클러스터는 감지하지 못해, 공유하고있는 디렉토리를 삭제할 수 있어 메타데이터 기반 검사로 구현하였습니다.
There was a problem hiding this comment.
path + version + host까지 확인하기도 가능할 것 같은데, path + version만 확인하신 이유가 있나요?
(현재 purge 요청이 들어온 클러스터의 path+version+host 조합이 겹치는 다른 클러스터가 존재하는 경우 purge 실패하는 동작을 의미합니다.)
There was a problem hiding this comment.
다시 확인해봤는데 host 를 검증하지 않아 오탐 케이스가 있어서 host 도 확인하는 방식으로 변경했습니다.
023d4a5 to
670adbf
Compare
| return err | ||
| } | ||
|
|
||
| for host := range groupByHost(topo.Servers) { |
There was a problem hiding this comment.
path + version + host까지 확인하기도 가능할 것 같은데, path + version만 확인하신 이유가 있나요?
(현재 purge 요청이 들어온 클러스터의 path+version+host 조합이 겹치는 다른 클러스터가 존재하는 경우 purge 실패하는 동작을 의미합니다.)
670adbf to
f919048
Compare
🔗 Related Issue
⌨️ What I did
Arcus Cluster 관리를 위한 명령어 (
start,stop,delete,list,status)를 추가합니다.arcusctl cluster start <servicecode> [--node <address>] [--group <group-name>]arcusctl cluster stop <servicecode> [--node <address>] [--group <group-name>]arcusctl cluster delete <servicecode>arcusctl cluster listarcusctl cluster status <servicecode>특이사항
start/stop은 edition 기반으로 아래와 같이 동작합니다.--node단위로 구동/중지 가능--group단위로 구동/중지 가능테스트 방법
test-cluster-topology.yaml
command