Repository navigation
fix: mcc infra update가 detach로 재기동하고 종료되도록 수정 - #100
Merged
Merged
Conversation
- update에 -d 플래그가 등록되지 않아(run 전용 detachFlag 참조) 항상 포그라운드 docker compose up으로 붙어 명령이 끝나지 않던 문제 수정 - 재기동은 항상 up -d로 실행, pull/up 모두 SysCallWithError + RunE로 실패 시 0이 아닌 종료코드 반환 (pull 실패 시 재기동하지 않음) - bin/mcc, conf/docker/tool/mcc 재빌드 - docs/mc-admin-cli-infra.md에 update 동작 안내 추가
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
변경 요약
./mcc infra update가 이미지 pull 후docker compose up(포그라운드)에 붙어 명령이 끝나지 않던 문제를 고칩니다.update.go는detachFlag가 참이면up -d를 쓰도록 돼 있지만, 이 변수는run명령 전용이고-d플래그도runCmd에만 등록돼 있어 update에서는 항상 false였습니다. (./mcc infra update --help에-s만 존재) 결과적으로 update는 항상 attach 상태로 붙어 종료되지 않았고, Ctrl+C로 빠지면 compose가 대상 컨테이너를 stop시켰습니다.src/cmd/docker/update.go)docker compose up -d <서비스>로 실행 → 갱신 후 명령이 종료됩니다.Run→RunE,SysCall→SysCallWithError: pull/up 실패 시 0이 아닌 종료코드를 반환하고, pull이 실패하면 재기동하지 않습니다. (run명령의 기존 처리와 동일)infra info/docker logs로 확인" 안내 추가bin/mcc,conf/docker/tool/mcc(src/Makefile기본 타깃). 기존과 동일하게 동적 링크, GLIBC 2.34 요구.mcc rest post) 수정도 바이너리에 함께 반영됩니다. (기존bin/mcc는0f4f991이후 재빌드되지 않았음)docs/mc-admin-cli-infra.mdupdate 절에 동작 안내 한 줄 추가테스트 결과
go vet ./...go test ./...make(bin/mcc, tool/mcc 빌드)참고: 실패 시 오류 메시지가 두 번 출력됩니다(cobra
Error:+ main 출력).