From 2281039c1bfa712346f0426ae9e882114ffacf74 Mon Sep 17 00:00:00 2001 From: yakenator Date: Fri, 28 Aug 2026 06:19:19 +0900 Subject: [PATCH] =?UTF-8?q?cli=20v0.12.3:=20=EC=86=8C=EC=8A=A4=20=ED=94=84?= =?UTF-8?q?=EB=A1=9C=EB=B9=84=EC=A0=80=EB=8B=9D=20=EC=97=94=EB=93=9C?= =?UTF-8?q?=ED=8F=AC=EC=9D=B8=ED=8A=B8=20=EC=88=98=EC=A0=95=20=E2=80=94=20?= =?UTF-8?q?POST=20/services(clusterId=20in=20body).=20/clusters/{id}/servi?= =?UTF-8?q?ces=20=EB=8A=94=20GET=EC=A0=84=EC=9A=A9=EC=9D=B4=EB=9D=BC=20405?= =?UTF-8?q?=20=EB=82=98=EB=8D=98=20=EA=B2=83(board6=20'=EA=B6=8C=ED=95=9C'?= =?UTF-8?q?=20=EC=98=A4=EC=A7=84=20=EC=8B=A4=EC=9D=80=20=EC=9E=98=EB=AA=BB?= =?UTF-8?q?=EB=90=9C=20=EC=97=94=EB=93=9C=ED=8F=AC=EC=9D=B8=ED=8A=B8)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/yakcloud | 2 +- scripts/yakcloud_deploy.py | 14 +++++--------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/bin/yakcloud b/bin/yakcloud index 081cfc5..19946fa 100755 --- a/bin/yakcloud +++ b/bin/yakcloud @@ -14,7 +14,7 @@ set -uo pipefail # -e 미사용: 'test && action' 관용구가 값 없을 때 REPO="${YAKCLOUD_STARTER_REPO:-https://gitea.yakenator.io/yakenator/yakcloud-starter}" BRANCH="${YAKCLOUD_STARTER_BRANCH:-main}" -VERSION="0.12.2" +VERSION="0.12.3" CONFIG_DIR="${YAKCLOUD_CONFIG_DIR:-$HOME/.config/yakcloud}" CONFIG_FILE="$CONFIG_DIR/config" diff --git a/scripts/yakcloud_deploy.py b/scripts/yakcloud_deploy.py index 0917ac0..4e65408 100644 --- a/scripts/yakcloud_deploy.py +++ b/scripts/yakcloud_deploy.py @@ -100,25 +100,21 @@ def reconcile_source(req: dict) -> str | None: log(f"source '{name}' ({stype}) 이미 READY → 스킵 (id={match['id']})") return match["id"] if DRY: - # 배포 토큰으로는 소스 생성이 막힐 수 있으므로, 없으면 미리 경고(실패 예측). if match: log(f"source '{name}' 상태={match.get('status')} — READY 대기 필요") else: - log(f"⚠ source '{name}' 없음 — 배포 토큰으론 생성 불가할 수 있음. " - f"콘솔에서 만들거나 requires[].name/binds[].source 를 기존 READY 소스로 지정. 현재 READY: {_ready_sources()}") + log(f"source '{name}' ({stype}, {plan}) 없음 → 프로비저닝 예정(POST /services). 현재 READY: {_ready_sources()}") return None if not match: log(f"source '{name}' ({stype}, {plan}) 프로비저닝 시도…") try: - api("POST", f"/clusters/{CLUSTER}/services", + # 소스 생성 = POST /services (clusterId 는 body). /clusters/{id}/services 는 GET 전용. + api("POST", "/services", {"clusterId": CLUSTER, "type": stype, "name": name, "mode": "local", "size": plan}) except SystemExit as e: - # 405/403 등 — 이 토큰으로 생성 불가. 행동 가능한 안내로 전환. raise SystemExit( - f"소스 '{name}' 자동 생성 불가(배포 토큰 권한). 콘솔에서 소스를 만든 뒤 " - f"requires[].name·binds[].source 를 기존 소스명으로 지정하세요.\n" - f" 현재 READY 소스: {_ready_sources()}\n" - f" (원인: {e})") + f"소스 '{name}' 생성 실패 — 콘솔에서 소스를 만든 뒤 requires[].name·binds[].source 를 그 소스명으로 " + f"지정하거나 다시 시도하세요.\n 현재 READY 소스: {_ready_sources()}\n (원인: {e})") for _ in range(120): # ~10분 s = next((s for s in cluster_services() if s.get("name") == name), None) if s and s.get("status") == "READY":