Page MenuHomePhabricator
Paste P89878

(An Untitled Masterwork)
ActivePublic

Authored by taavi on Mar 18 2026, 8:28 AM.
Project Tags
None
Referenced Files
F73033775: raw-paste-data.txt
Mar 18 2026, 12:21 PM
F73018931: raw-paste-data.txt
Mar 18 2026, 8:28 AM
Subscribers
None
#!/bin/bash
set -euo pipefail
prefix="$(cat /etc/wmcs-project)"
backfill_tool() {
local tool="$1"
sudo -iu "$prefix.$tool" toolforge webservice restart || true
}
for file in /data/project/*/service.manifest
do
tool="$(echo $file | cut -d/ -f4)"
if ! grep -q "backend:" "$file"; then
echo "$tool no backend set"
continue
fi
if test -f "/data/project/$tool/k8s.disabled"; then
echo "$tool disabled"
continue
fi
if kubectl sudo get httproute -n "tool-$tool" 2>&1 | grep -q "toolforge.org"; then
echo "$tool already migrated"
continue
fi
if ! kubectl get ing -n "tool-$tool" 2>&1 | grep -q "toolforge.org"; then
echo "$tool not running?"
continue
fi
echo "$tool"
backfill_tool "$tool"
sleep 10
done