Files
document-haness/docs/keycloak-session-store/final/assets/d4a-hook-effect/d4a-hook-effect.alt.md
T

23 lines
1.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 훅 하나가 만드는 차이
## Alternative text
certbot 이 갱신에 성공한 뒤 deploy 훅이 nginx 를 reload 하는 경로와, 그 훅이 없어 사람이 개입해야 하는 경로가 갈리는 구성.
## Long description
훅이 없을 때 새 인증서가 디스크에 기록된 08:20:27 과 실제로 서빙된 08:58:52 사이가 2305초였고, 그것도 사람이 nginx -s reload 를 쳤기 때문이다. deploy 훅을 넣자 발급에서 서빙까지 1~2초가 됐다. 판정은 문구가 아니라 워커 PID 로 한다. certbot 이 Hook 'deploy-hook' ran with error output 이라고 찍지만 실패가 아니며 nginx 의 types_hash 경고가 stderr 로 나갔을 뿐이다. 로그에서 error 를 grep 하는 감시는 성공한 훅을 실패로 오독한다.
## Elements and evidence
- **certbot 갱신 성공** (process): archive 에 쓰고 live 링크를 옮긴다. Evidence: L1077L1088.
- **deploy 훅** (process): 갱신이 실제로 일어났을 때만 실행된다. Evidence: L1077L1092.
- **nginx 워커 교체** (process): 마스터는 유지되고 워커만 새로 뜬다. Evidence: L1089L1097.
- **새 인증서 서빙** (service): 훅이 없으면 사람이 칠 때까지 옛 것이다. Evidence: L1077L1097.
## Relationships
- **deploy 훅 → nginx 워커 교체:** reload 신호. Evidence: L1077L1097.
- **certbot 갱신 성공 → deploy 훅:** 갱신 성공 시 호출. Evidence: L1077L1092.
- **nginx 워커 교체 → 새 인증서 서빙:** 새 인증서 적재. Evidence: L1089L1097.