fix(deploy): Redis 기본 전용(local) — 공유 ACL 프리픽스 pub/sub NOPERM 해결 — 0.24.1
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@ -95,11 +95,18 @@ def _ready_sources() -> str:
|
||||
|
||||
def reconcile_source(req: dict) -> str | None:
|
||||
name, stype, plan = req["name"], req["type"].upper(), req.get("plan", "small")
|
||||
# 기본 mode: 대부분 shared(공유 외부에 격리 DB 민팅). 단 Redis 는 공유 격리가 ACL 키/채널 '프리픽스'(비투명 —
|
||||
# 앱이 맨 키/채널로 pub/sub 하면 NOPERM)라 **기본을 전용(local)**으로 → REDIS_URL 로 전권 사용(pub/sub 포함).
|
||||
# 명시 mode 는 존중. shared redis 는 프리픽스-인지 앱 전용(mode: shared 로 명시).
|
||||
mode = req.get("mode") or ("local" if stype == "REDIS" else "shared")
|
||||
match = next((s for s in cluster_services() if s.get("name") == name), None)
|
||||
if match and match.get("status") == "READY":
|
||||
cur = str(match.get("mode") or "").lower()
|
||||
if cur and cur != mode:
|
||||
log(f"⚠ source '{name}' 은 이미 mode={cur} 로 존재 → 매니페스트 mode={mode} 는 무시(재프로비저닝 안 함). "
|
||||
f"바꾸려면 삭제 후 재배포: 'yakcloud source rm {name}'.")
|
||||
log(f"source '{name}' ({stype}) 이미 READY → 스킵 (id={match['id']})")
|
||||
return match["id"]
|
||||
mode = req.get("mode", "shared") # shared(기본)=공유 외부 서버에 격리 DB 민팅 · local=인클러스터 프로비저닝(옵션, size 사용)
|
||||
if DRY:
|
||||
if match:
|
||||
log(f"source '{name}' 상태={match.get('status')} — READY 대기 필요")
|
||||
|
||||
Reference in New Issue
Block a user