Skip to content

hotfix: MySQL 초기화 완료 판정 로직 수정#60

Merged
Hexeong merged 1 commit into
mainfrom
hotfix/early-readiness-check-prob
Jul 10, 2026
Merged

hotfix: MySQL 초기화 완료 판정 로직 수정#60
Hexeong merged 1 commit into
mainfrom
hotfix/early-readiness-check-prob

Conversation

@Hexeong

@Hexeong Hexeong commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

관련 이슈

작업 내용

  • DB EC2 bootstrap의 MySQL readiness check를 mysqladmin ping에서 root 인증 기반 쿼리 실행으로 변경했습니다.
  • MySQL 초기화 시간이 길어지는 경우를 고려해 대기 시간을 60초에서 180초로 늘렸습니다.
  • 인증 가능한 상태가 된 뒤 scadmin 유저 생성 SQL이 실행되도록 순서를 보강했습니다.

특이 사항

문제 원인은 mysqladmin ping이 MySQL 서버 프로세스 응답 여부만으로 성공할 수 있어, root 인증이 아직 가능한 상태가 아닌데도 bootstrap이 다음 단계로 넘어간 점이었습니다. 이 때문에 CREATE USER 실행 시점에 ERROR 1045 (28000): Access denied for user 'root'@'localhost'가 발생했고, cloud-init final stage가 실패했습니다.

변경 후에는 mysql -uroot -p... -e "SELECT 1"이 성공해야만 준비 완료로 판단하므로, root 인증과 쿼리 실행이 모두 가능한 상태에서 유저 생성이 진행됩니다.

리뷰 요구사항 (선택)

  • root 인증 기반 readiness check로 변경한 방향이 bootstrap 안정성 측면에서 적절한지 확인 부탁드립니다.
  • 검증: bash -n modules/app_stack/scripts/mysql_setup.sh.tftpl, git diff --check, prod terraform plan 확인 완료 (Plan: 2 to add, 0 to change, 2 to destroy).

@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@Hexeong, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 43 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 31ae7f63-036a-4bb2-bf64-90b5d28f7232

📥 Commits

Reviewing files that changed from the base of the PR and between 6db3dc2 and a177cf1.

📒 Files selected for processing (1)
  • modules/app_stack/scripts/mysql_setup.sh.tftpl
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch hotfix/early-readiness-check-prob

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown

Terraform Plan: stage

No changes. Your infrastructure matches the configuration.

전체 plan 결과는 보안을 위해 댓글에 포함되지 않습니다. 워크플로우 실행 아티팩트를 확인하세요.

@github-actions

Copy link
Copy Markdown

Terraform Plan: prod

Plan: 2 to add, 0 to change, 2 to destroy.

전체 plan 결과는 보안을 위해 댓글에 포함되지 않습니다. 워크플로우 실행 아티팩트를 확인하세요.

@lsy1307 lsy1307 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

야옹

@Hexeong Hexeong merged commit c13a928 into main Jul 10, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants