Skip to content

이미지 정리 공용 블록 이관 - #1091

Merged
m-a-king merged 1 commit into
devfrom
infra/prune-images-gate
Oct 20, 2026
Merged

m-a-king merged 1 commit into
devfrom
infra/prune-images-gate

Conversation

@m-a-king

@m-a-king m-a-king commented Sep 13, 2026 •

Copy link
Copy Markdown
Collaborator

한눈에

core 배포 작업이 디스크 여유를 먼저 확인

  • 이전: core 배포 작업이 서버의 옛 컨테이너 이미지를 직접 지움
    • renderer·extractor 배포 작업도 같은 정리를 각자 따로 둠
  • core 배포 작업이 세 서비스가 함께 쓰는 정리 스크립트를 호출
  • 정리 뒤 디스크 여유가 10GB 미만이면 배포 작업이 실패
    • 새 이미지를 받기 전에 멈춤
    • 이전: 새 이미지를 받는 도중에 실패
  • 머지 직후 dev 서버 자동 배포
    • 결과: dev 서버 여유 약 14GB 로 통과 예상

Situation

공용 블록 소비

Task

인라인 정리의 블록 교체

Action

정리 호출 교체

대상 이전 이후
정리 명령 인라인 docker image prune -af·df 공용 블록 호출
정리 위치 pull 앞 pull 앞 (동일)
공간 부족 시 pull 이 failed to extract layer 로 중단 여유 미달 메시지와 함께 pull 앞에서 중단
기준값 자리 없음 infra 블록 기본값 10GB

Result

여유 기준 충족

서버 볼륨 정리 직후 여유
dev 25GB 14GB
prod 25GB 16GB
  • 참조: 최근 배포 로그의 정리 직후 df (dev 2026-10-19·prod 2026-10-18)
  • 참조: 볼륨 통일 앱 박스 루트 볼륨을 25GB 로 통일 infra#94
  • blue-green 두 슬롯의 이미지는 정리 대상 아님
    • 원인: 실행 중인 컨테이너의 이미지
  • 위험: 기준 10GB 미만인 박스를 새로 들이면 그 박스의 배포가 매번 중단
    • 예외: 그 서비스만 --min-free-gb 로 덮어씀

연관 이슈

@m-a-king m-a-king added the infra 운영 환경 (IaC·클라우드 리소스·secret·배포 workflow) label Sep 13, 2026
@m-a-king m-a-king self-assigned this Sep 13, 2026
@coderabbitai

coderabbitai Bot commented Sep 13, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: Repository: TeamPiKi/core/.coderabbit.yml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: aaa0682c-0a0f-43ec-a04f-f47923e70b0a
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

Discord 스레드 연동용 메타데이터입니다. discord-pr-bot 워크플로가 자동 생성하며, 수정·삭제하면 PR 과 Discord 알림 연동이 끊깁니다.

@m-a-king
m-a-king force-pushed the infra/prune-images-gate branch from c8c8228 to 8a72628 Compare September 28, 2026 11:49
@m-a-king m-a-king changed the title 이미지 정리를 공용 블록으로 위임하고 여유 가드를 붙임 이미지 정리 공용 블록 이관 Sep 28, 2026
@m-a-king
m-a-king force-pushed the infra/prune-images-gate branch from 8a72628 to 91e1157 Compare October 20, 2026 08:56
- 인라인 prune -af·df 를 prune_images.sh 호출로 교체
  - 원인: 세 repo 가 정리를 각자 두다 정책이 셋으로 갈림. renderer 가 #336 과 같은 실패를 2026-09-13 에 다시 냄
  - 결과: 동작 동일. pull 앞 정리 위치 유지
- 정리 후 여유 10GB 미만이면 pull 앞에서 배포 중단
  - 이전: 공간 부족 시 pull 이 failed to extract layer 로 중단
  - 결과: 최근 배포 로그의 정리 직후 여유 dev 14G·prod 16G
  - 참조: 기준값은 블록 기본값 (TeamPiKi/infra#97)
- 배포 파일 업로드 목록에 prune_images.sh 추가
@m-a-king
m-a-king force-pushed the infra/prune-images-gate branch from 91e1157 to 22a8319 Compare October 20, 2026 08:59
@m-a-king
m-a-king merged commit 0727166 into dev Oct 20, 2026
4 checks passed
@m-a-king
m-a-king deleted the infra/prune-images-gate branch October 20, 2026 09:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

infra 운영 환경 (IaC·클라우드 리소스·secret·배포 workflow)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant