Skip to content

Commit cc0239d

Browse files
committed
docs(manual-test-plan): align retry section N.3 with actual iptables / cancellation semantics
Two fixes from review feedback on the retry scenario: 1. `iptables -j DROP` silently discards SYN packets; the talos client retries the TCP handshake until its own deadline expires, so the lookup classifies as deadline (timeout) rather than refused. The expected line said 'connection refused class hint', which would never have matched a real run. Switched the example to `REJECT --reject-with tcp-reset` so the kernel surfaces ECONNREFUSED immediately and the expected hint matches. Added a parenthetical noting that swapping back to DROP intentionally exercises the deadline-class path with its own expected hint text. 2. Ctrl+C interrupt assertion of '~100ms' was too strict — even with correctly wired cancellation, ssh / busy host scheduling can push the wall-clock observation past 100ms and produce false negatives in manual runs. Relaxed to 'well under 1s' (anything visibly faster than the full ~600ms retry budget proves the cancellation path is correct). Signed-off-by: Aleksei Sviridkin <[email protected]>
1 parent cf1008c commit cc0239d

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

‎docs/manual-test-plan.md‎

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1571,27 +1571,29 @@ ssh ${NODE} iptables -D INPUT -p tcp --dport 50000 -j DROP
15711571

15721572
Expected: template render succeeds after retry (1 to 2 retried attempts visible only if `--debug` is on); operator sees the rendered output, no error message.
15731573

1574-
Same shape against a node that stays down longer than the budget:
1574+
Same shape against a node that stays down longer than the budget. Use `REJECT --reject-with tcp-reset` rather than `-j DROP` — DROP silently discards SYN packets, the talos client retries the TCP handshake until its own deadline expires, and the lookup classifies as deadline (timeout) instead of refused. REJECT sends an RST so the kernel surfaces ECONNREFUSED immediately, matching what an operator typically sees from a firewall-blocked or stopped-service node:
15751575

15761576
```bash
1577-
ssh ${NODE} iptables -A INPUT -p tcp --dport 50000 -j DROP
1577+
ssh ${NODE} iptables -A INPUT -p tcp --dport 50000 -j REJECT --reject-with tcp-reset
15781578
talm template -f nodes/node0.yaml || true
1579-
ssh ${NODE} iptables -D INPUT -p tcp --dport 50000 -j DROP
1579+
ssh ${NODE} iptables -D INPUT -p tcp --dport 50000 -j REJECT --reject-with tcp-reset
15801580
```
15811581

15821582
Expected: failure after ~600ms+ (3 attempts × backoff); operator sees the `connection refused` class hint pointing at firewall / port / `--offline`.
15831583

1584-
Ctrl+C should interrupt retries instantly:
1584+
(If you intentionally want the deadline-class path instead, swap REJECT for `-j DROP` — the expected hint then mentions `timed out` rather than `connection refused`.)
1585+
1586+
Ctrl+C should interrupt retries well before the full retry budget:
15851587

15861588
```bash
1587-
ssh ${NODE} iptables -A INPUT -p tcp --dport 50000 -j DROP
1589+
ssh ${NODE} iptables -A INPUT -p tcp --dport 50000 -j REJECT --reject-with tcp-reset
15881590
talm template -f nodes/node0.yaml &
15891591
sleep 0.1
15901592
kill -INT $!
1591-
ssh ${NODE} iptables -D INPUT -p tcp --dport 50000 -j DROP
1593+
ssh ${NODE} iptables -D INPUT -p tcp --dport 50000 -j REJECT --reject-with tcp-reset
15921594
```
15931595

1594-
Expected: `talm` exits within ~100ms, not after the full 600ms retry budget.
1596+
Expected: `talm` exits well under 1s (the cancellation interrupts the inter-attempt backoff sleep immediately) rather than the full ~600ms retry budget. A hard sub-100ms bound is too brittle across ssh hops and busy hosts — anything visibly faster than the full budget proves the cancellation path is wired correctly.
15951597

15961598
### N.4 Lookup error diagnostics — non-network failure
15971599

0 commit comments

Comments
 (0)