P6: Migrate Kiwix and Transmission to Kubernetes #39
2 changed files with 3 additions and 7 deletions
Fix torrent sync readiness check and remove indri transmission/kiwix roles
- Fix sync script to accept HTTP 409 as "ready" (transmission RPC behavior) - Remove transmission, transmission_metrics, kiwix roles from indri.yml Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
commit
bff899499a
|
|
@ -30,12 +30,7 @@
|
||||||
- role: prometheus
|
- role: prometheus
|
||||||
tags: prometheus
|
tags: prometheus
|
||||||
# NOTE: grafana role removed - now hosted in k8s (see argocd/apps/grafana.yaml)
|
# NOTE: grafana role removed - now hosted in k8s (see argocd/apps/grafana.yaml)
|
||||||
- role: transmission
|
# NOTE: transmission, transmission_metrics, kiwix roles removed - now hosted in k8s (see argocd/apps/torrent.yaml, argocd/apps/kiwix.yaml)
|
||||||
tags: transmission
|
|
||||||
- role: transmission_metrics
|
|
||||||
tags: transmission_metrics
|
|
||||||
- role: kiwix
|
|
||||||
tags: kiwix
|
|
||||||
- role: borgmatic
|
- role: borgmatic
|
||||||
tags: borgmatic
|
tags: borgmatic
|
||||||
- role: borgmatic_metrics
|
- role: borgmatic_metrics
|
||||||
|
|
|
||||||
|
|
@ -18,10 +18,11 @@ data:
|
||||||
echo "Syncing ZIM torrents to transmission at ${TRANSMISSION_HOST}:${TRANSMISSION_PORT}"
|
echo "Syncing ZIM torrents to transmission at ${TRANSMISSION_HOST}:${TRANSMISSION_PORT}"
|
||||||
|
|
||||||
# Wait for transmission to be ready
|
# Wait for transmission to be ready
|
||||||
|
# Transmission RPC returns 409 on first request (to provide session ID), which is fine
|
||||||
echo "Waiting for Transmission RPC..."
|
echo "Waiting for Transmission RPC..."
|
||||||
max_attempts=30
|
max_attempts=30
|
||||||
attempt=0
|
attempt=0
|
||||||
until curl -sf "http://${TRANSMISSION_HOST}:${TRANSMISSION_PORT}/transmission/rpc" >/dev/null 2>&1; do
|
until curl -s -o /dev/null -w "%{http_code}" "http://${TRANSMISSION_HOST}:${TRANSMISSION_PORT}/transmission/rpc" | grep -qE "^(200|409)$"; do
|
||||||
attempt=$((attempt + 1))
|
attempt=$((attempt + 1))
|
||||||
if [[ $attempt -ge $max_attempts ]]; then
|
if [[ $attempt -ge $max_attempts ]]; then
|
||||||
echo "Transmission not ready after ${max_attempts} attempts, will retry next cycle"
|
echo "Transmission not ready after ${max_attempts} attempts, will retry next cycle"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue