Skip to content

운영 배포(OCI drain 옵션 수정)#239

Merged
Hwanvely merged 14 commits intomainfrom
dev
Apr 6, 2026
Merged

운영 배포(OCI drain 옵션 수정)#239
Hwanvely merged 14 commits intomainfrom
dev

Conversation

@Hwanvely
Copy link
Copy Markdown
Collaborator

@Hwanvely Hwanvely commented Apr 6, 2026

No description provided.

* fix: 피버타임 검증 시 점수가 두배가 되지 않는 문제 해결

* refactor: 바뀐 dto에 맞게 BIZ 및 test 수정
* fix: 피버타임 검증 시 점수가 두배가 되지 않는 문제 해결

* refactor: 바뀐 dto에 맞게 BIZ 및 test 수정

* fix: 피버타임중 일시정지 시 피버타임도 멈추게 한다

* refactor: 인터페이스로 묶는다
* fix: 점수 증가 로직 오류 해결

* fix: 스트릭 발생 시각을 받는다

* refactor: 네이밍 수정

* fix(test): 스트릭 발생 시각 추가
* fix: 치팅 및 네트워크 지연 해결

* comment: 디버깅을 위한 로그 추가

* fix: session과 fevertime 일시정지 동기화
* fix: 치팅 및 네트워크 지연 해결

* comment: 디버깅을 위한 로그 추가

* fix: session과 fevertime 일시정지 동기화

* fix: 세션 예외 오류 해결

* feat: multipart 예외 핸들링

* refactor: CD 파이프라인 OCI로 마이그레이션

* fix: end response 분리
* fix: 치팅 및 네트워크 지연 해결

* comment: 디버깅을 위한 로그 추가

* fix: session과 fevertime 일시정지 동기화

* fix: 세션 예외 오류 해결

* feat: multipart 예외 핸들링

* refactor: CD 파이프라인 OCI로 마이그레이션

* fix: end response 분리

* fix: oci 경로 수정
@Hwanvely Hwanvely self-assigned this Apr 6, 2026
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds shebangs to deployment scripts and modifies the OCI NLB backend update process in deploy-rolling.sh. Feedback highlights that removing the --wait-for-state SUCCEEDED and --force flags may lead to race conditions and execution failures in non-interactive environments. There is also a recommendation to ensure the script waits for state changes when re-enabling backends to prevent availability issues during rolling deployments.

--backend-name "$HTTP_BACKEND" \
--is-drain "$is_drain" \
--wait-for-state SUCCEEDED
--is-drain "$is_drain"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

oci nlb backend update 명령에서 --wait-for-state SUCCEEDED--force 옵션을 제거하면 두 가지 주요 위험이 발생합니다.

  1. 경합 조건 (Race Condition): 첫 번째 명령(http)이 완료되기 전에 두 번째 명령(https)이 실행되면, 동일한 NLB 리소스에 대한 동시 업데이트 시도로 인해 409 Conflict 오류가 발생할 수 있습니다. OCI API는 일반적으로 동일 리소스에 대한 병렬 수정을 허용하지 않습니다.
  2. 자동화 중단: --force 옵션이 없으면 CLI가 특정 상황에서 사용자 확인을 요청할 수 있어, 비대화형(non-interactive) 환경에서 스크립트가 중단될 수 있습니다.

가급적이면 해당 옵션들을 유지하여 안정성을 확보하는 것이 좋습니다.

Suggested change
--is-drain "$is_drain"
--is-drain "$is_drain" \
--wait-for-state SUCCEEDED \
--force

--backend-name "$HTTPS_BACKEND" \
--is-drain "$is_drain" \
--wait-for-state SUCCEEDED
--is-drain "$is_drain"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

위의 http 백엔드 설정과 마찬가지로, https 백엔드 업데이트 시에도 --wait-for-state SUCCEEDED--force 옵션을 유지하는 것이 안전합니다. 특히 --wait-for-state는 이어지는 if 문이나 다음 배포 단계로 넘어가기 전에 설정이 확실히 반영되었음을 보장합니다.

Suggested change
--is-drain "$is_drain"
--is-drain "$is_drain" \
--wait-for-state SUCCEEDED \
--force

--is-drain "$is_drain"


if [ "$is_drain" = "true" ]; then
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

현재 로직은 is_draintrue일 때만 10초를 대기합니다. 하지만 서비스를 다시 활성화(is_drain=false)할 때도 --wait-for-state 옵션이 제거되었기 때문에, NLB가 백엔드 설정을 완전히 반영하기 전에 스크립트가 종료될 수 있습니다.

롤링 배포 환경에서 이전 서버가 아직 NLB에 복구되지 않은 상태에서 다음 서버의 배포(및 드레인)가 시작되면 전체 서비스 가용성에 영향을 줄 수 있습니다. is_drain 값과 관계없이 상태 변경이 완료될 때까지 기다리거나, false인 경우에도 적절한 대기 시간을 갖는 것을 권장합니다.

@Hwanvely Hwanvely merged commit 1ad1f6a into main Apr 6, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant