nuisance: 24 new blocks 09-07 (backlog of missed runs) + path/env fixes
Sweep checkout path moved to ~/projects/KNEL/KNELPFVCluster; creds now accepted from env (vault/sm-ready) since ~/.creds textfiles retired. Redmine: https://projects.knownelement.com/issues/796#note-134
This commit is contained in:
@@ -20,12 +20,12 @@
|
||||
# are untouched in practice.
|
||||
#
|
||||
# Run (workstation; needs tests/remote.sh chokepoint + ~/.creds/cloudron.env):
|
||||
# cd ~/projects/PFVCluster && timeout 300 env VM_IP=my.knownelement.com VM_USER=root \
|
||||
# cd ~/projects/KNEL/KNELPFVCluster && timeout 300 env VM_IP=my.knownelement.com VM_USER=root \
|
||||
# bash ~/projects/cloudron/perf/nuisance/nuisance-sweep.sh [--dry]
|
||||
|
||||
set -u
|
||||
|
||||
PFV_DIR=${PFV_CLUSTER_DIR:-/home/reachableceo/projects/PFVCluster}
|
||||
PFV_DIR=${PFV_CLUSTER_DIR:-/home/reachableceo/projects/KNEL/KNELPFVCluster}
|
||||
NUIS_DIR=${NUISANCE_DIR:-/home/reachableceo/projects/cloudron/perf/nuisance}
|
||||
ALLOWLIST="$NUIS_DIR/allowlist.txt"
|
||||
HOST_NAME=my.knownelement.com
|
||||
@@ -47,11 +47,15 @@ timeout 120 env VM_IP="$HOST_NAME" VM_USER=root bash tests/remote.sh vm \
|
||||
deny_lines=$(wc -l < "$TMP/scan")
|
||||
|
||||
# --- 2. current blocklist from the Cloudron API ---
|
||||
[ -f "$HOME/.creds/cloudron.env" ] || fail "$HOME/.creds/cloudron.env missing"
|
||||
set -a
|
||||
# shellcheck disable=SC1091 # creds file path built above
|
||||
. "$HOME/.creds/cloudron.env"
|
||||
set +a
|
||||
# Creds: pre-exported env (e.g. `sm env cloudron`) wins; ~/.creds fallback is
|
||||
# legacy (the textfile pattern was RETIRED 2026-09-06 — vault via sm is the way).
|
||||
if [ -z "${CLOUDRON_URL:-}" ] || [ -z "${CLOUDRON_API_TOKEN:-}" ]; then
|
||||
[ -f "$HOME/.creds/cloudron.env" ] || fail "no CLOUDRON_URL/CLOUDRON_API_TOKEN in env and $HOME/.creds/cloudron.env missing"
|
||||
set -a
|
||||
# shellcheck disable=SC1091 # creds file path built above
|
||||
. "$HOME/.creds/cloudron.env"
|
||||
set +a
|
||||
fi
|
||||
[ -n "${CLOUDRON_URL:-}" ] && [ -n "${CLOUDRON_API_TOKEN:-}" ] || fail "creds file lacks CLOUDRON_URL/CLOUDRON_API_TOKEN"
|
||||
curl -sf --max-time 15 "$CLOUDRON_URL/api/v1/network/blocklist" \
|
||||
-H "Authorization: Bearer $CLOUDRON_API_TOKEN" \
|
||||
|
||||
Reference in New Issue
Block a user