mirror of
https://github.com/Sagit-chu/flvx.git
synced 2026-09-28 07:36:38 +08:00
669323f926
- Normalize whitespace in error messages to handle collapsed variants (e.g., 'address alreadyin use') - Delete all forward service name variants (_tcp, _udp, base) during cleanup instead of stopping after first success - Add comprehensive test coverage for edge cases
2.7 KiB
2.7 KiB
016 Tunnel Runtime Bind Conflict Retry
Checklist
- Confirm tunnel
connectIpprecedence remainsconnectIp > node tcp_listen_addrfor runtime service listen address. - Add tunnel runtime
address already in userecovery that deletes the stale service and retriesAddService. - Keep non-bind failures unchanged and avoid altering tunnel chain apply semantics.
- Add regression tests for tunnel service address precedence and bind-conflict retry behavior.
- Run focused backend handler tests and record the result.
- Add a contract test that simulates node-side
address already in useduring tunnel update and verifies retry success. - Investigate whether forward update
address already in usereports are only tunnel-redeploy linkage or also an independent forward path. - Add a contract test that simulates node-side
address already in useduring tunnel update and verifies retry success. - Investigate whether forward update
address already in usereports are only tunnel-redeploy linkage or also an independent forward path.
Test Record
- Command:
cd go-backend && go test ./internal/http/handler/... - Result: passed.
- Command:
cd go-backend && go test ./tests/contract/... -run 'TestTunnelUpdateRecoversFromAddressInUseContract|TestForwardCreateRollbackWhenServiceDispatchReturnsAddressInUseContract|TestForwardUpdateIgnoresDeletedSpeedLimitContract' - Result: passed.
- Command:
cd go-backend && go test ./tests/contract/... -run 'TestForwardUpdateRecoversFromAddressInUseContract|TestTunnelUpdateRecoversFromAddressInUseContract' - Result: passed.
- Command:
cd go-backend && go test ./internal/http/handler/... && go test ./tests/contract/... -run 'TestForwardUpdateRecoversFromAddressInUseContract|TestTunnelUpdateRecoversFromAddressInUseContract' - Result: passed.
Investigation Note
- Forward update still has its own independent
address already in userecovery path insyncForwardServicesWithWarnings/rebindForwardServiceOnSelfOccupiedPort; tunnel update linkage is not the only possible source of the symptom. - Tunnel update also triggers downstream forward
UpdateServicefor bound forwards, so users can still observe the same error around a tunnel edit even when the failing runtime is on the tunnel side. - Real node output can collapse spaces into variants like
address alreadyin use/cannotassignrequestedaddress; bind-conflict detection now normalizes whitespace before classifying the error. - Forward self-heal cleanup now deletes every candidate runtime name variant instead of stopping after the first successful delete, which avoids leaving sibling
_tcp/_udpservices behind to keep the port occupied.