You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
FIX: Check ZooKeeper with ruok over SSH before deletion - #62
f1v3-dev
changed the title
FIX: Check ZooKeeper sate with mntr and pgrep before deletion
FIX: Check ZooKeeper with ruok over SSH before deletion
Sep 15, 2026
리뷰 완료 — Blocker 0건, Major 0건, Minor 0건, Question 1건
[Question] verifyAllStopped(internal/zk/delete.go)는 서버가 정지되었다고 판단하는 조건을 nc -v 실행이 exit code 1을 반환하고 출력에 "Connection refused"가 포함된 경우로 한정합니다. 원격 장비에 설치된 nc 구현체(BusyBox nc, ncat 등)에 따라 종료 코드나 메시지 문구가 이와 다를 수 있습니다. 그 경우 실제로는 정지된 서버도 "확인 불가" 오류로 처리되어 삭제가 차단되므로 데이터 손상으로 이어지지는 않지만(안전한 방향으로 실패), 배포 대상 환경들의 nc 구현체가 이 문구/종료 코드 조합을 보장하는지 확인해 주세요.
생각을 해봤었는데, zkServer.sh stop으로 종료하게 될 경우 PID 파일을 삭제하지만, kill로 종료하게 될 경우 파일이 남아있어 파일 존재 여부만으로는 실행 상태를 판단하기 어렵다고 생각했으며, PID의 실제 프로세스 존재 여부와 해당 ZooKeeper 노드인지까지 검증이 필요합니다.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🔗 Related Issue
⌨️ What I did
zk delete의 디렉터리 존재 검사를 제거하여, 원격 디렉터리가 이미 삭제된 경우에도 정리할 수 있도록 변경합니다.ruok를 실행하여 삭제 전 연결 상태를 확인하도록 변경합니다.zk delete의 오류를RunE로 반환하도록 변경하고, CLI 오류가 중복 출력되지 않도록 정리했습니다.