fix list-restorable.sh process-substitution infinite loop in volume-keys read loop

Regression from d896378e: putting < <(...) on `read` re-runs the producer each iteration. Capture required volume keys once and feed via done<<<.
This commit is contained in:
2026-08-04 16:23:28 +02:00
parent b23545e143
commit 7d27ff1918

View File

@@ -121,7 +121,6 @@ while IFS= read -r entry; do
fi
compose_file=$(echo "$entry" | jq -r '.compose_file')
volumes=$(echo "$entry" | jq -r '.volumes[]')
# Check if compose file exists
compose_path="${dir}/${compose_file}.yml"
@@ -134,9 +133,12 @@ while IFS= read -r entry; do
missing_volumes=()
backup_info=()
# Get required persistent volumes (excluding ephemeral and optional)
# Use process substitution to avoid subshell issues
while IFS= read -r volume < <(get_required_volume_keys "$compose_path"); do
# Required persistent volumes only (exclude ephemeral + optional).
# Must feed the loop via done<<< / done< <(...) — putting < <(...) on
# `read` re-runs the producer every iteration and infinite-loops on the
# first key (vibe regression 2026-08-04 d896378e).
volumes=$(get_required_volume_keys "$compose_path")
while IFS= read -r volume; do
volume_name="rpc_${volume}"
# jwt/secrets volumes are regenerated at create-node — never backed up by
# design, so they must not gate restorability (kept plasma marked