diff --git a/scripts/taler-monitoring/check_goa_ladder.sh b/scripts/taler-monitoring/check_goa_ladder.sh index 24e52ca..ea3767e 100755 --- a/scripts/taler-monitoring/check_goa_ladder.sh +++ b/scripts/taler-monitoring/check_goa_ladder.sh @@ -338,7 +338,7 @@ for AMT in "$@"; do # Server-side auto-confirm only watches landing withdraw-watch.ids — ladder must confirm itself. bank_st() { curl -sS -m 8 "${BANK}/taler-integration/withdrawal-operation/${WID}" 2>/dev/null \ - | python3 -c 'import json,sys; print(json.load(sys.stdin).get("status",""))' 2>/dev/null || true + | python3 -c 'import json,sys; print((json.load(sys.stdin).get("status") or "").strip())' 2>/dev/null || true } do_confirm() { curl -sS -m 15 -o "$SCRATCH/conf-$tag.json" -w '%{http_code}' -X POST \ @@ -416,8 +416,12 @@ else: "${BANK}/taler-integration/withdrawal-operation/${WID}" 2>/dev/null || echo "000") info "force-select" "HTTP ${code_fs} rpub=${rpub:0:12}…" else + _rpub_empty=no + [ -z "$rpub" ] && _rpub_empty=yes + _epayto_empty=no + [ -z "$epayto" ] && _epayto_empty=yes warn bank "force-select skipped" \ - "problem: missing reserve_pub or exchange payto (rpub_empty=$( [ -z "$rpub" ] && echo yes || echo no ); cannot move bank status pending→selected)" + "problem: cannot move bank pending->selected (reserve_pub empty=${_rpub_empty}, exchange payto empty=${_epayto_empty})" fi } @@ -457,26 +461,16 @@ else: sleep 0.4 done ms_confirm=$(elapsed_ms "$t0") + st=$(printf '%s' "${st:-}" | tr -d '\r\n' | sed 's/^[[:space:]]*//;s/[[:space:]]*$//') if [ "$conf_ok" != "1" ]; then note="${note:-confirm timeout last=${st:-empty}}" - # Soft: stuck pending is often force-select/rpub or bank lag — do not kill whole ladder - if [ "${st:-}" = "pending" ] || [ -z "${st:-}" ]; then - status="SKIP_CONFIRM" - warn bank "confirm $AMT skipped" \ - "problem: bank withdrawal stayed '${st:-empty}' (not selected) after ${LADDER_CONFIRM_POLLS} polls — reserve may not have been attached; ladder continues. detail: $note" - ms_total=$(elapsed_ms "$t_rung") - echo -e "${rung}\t${range_note}\t${AMT}\t${status}\t${ms_mint}\t${ms_accept}\t${ms_confirm}\t${ms_settle}\t${ms_total}\t${WID}\t${note}" >>"$TSV" - continue - fi - err bank "confirm $AMT" "$note" - status="FAIL_CONFIRM" - STOP_REASON="$note" - STOP_AMOUNT="$AMT" + # Soft: not confirmed after polls — WARN and continue (pending/select lag or force-select issues) + status="SKIP_CONFIRM" + warn bank "confirm $AMT skipped" \ + "problem: bank status='${st:-empty}' after ${LADDER_CONFIRM_POLLS} polls (want selected/confirmed); ladder continues. detail: $note" ms_total=$(elapsed_ms "$t_rung") - printf '%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n' \ - "$rung" "$range_note" "$AMT" "$status" "$ms_mint" "$ms_accept" "$ms_confirm" "$ms_settle" "$ms_total" "$WID" "$note" >>"$TSV" - FAIL_N_L=$((FAIL_N_L + 1)) - break + echo -e "${rung}\t${range_note}\t${AMT}\t${status}\t${ms_mint}\t${ms_accept}\t${ms_confirm}\t${ms_settle}\t${ms_total}\t${WID}\t${note}" >>"$TSV" + continue fi ok "confirm $AMT ${ms_confirm}ms (client, on selected)"