mirror of
https://github.com/tailscale/tailscale.git
synced 2026-10-09 11:52:00 -04:00
tstest/natlab/vnet: don't hand out idle agent conns the agent already closed
TestSelfSignedDERPHashPinning occasionally fails on a slow vm with:
tailscale up (limit 1m30s): Get "http://unused/up?accept-routes=true": EOF
Because this endpoint has both IPv4 and IPv6 addresses, TTA will fall
back to the second address when running on a slow host and race both
connections. The losing connection will get closed by net.Dialer and
never produce a response.
By keeping the gVisor endpoint with the conn, we can avoid returning
closed connections in takeAgentConnOne().
This fix uncovered a bug in Env.Tailscale(): calling "tailscale
update" via a GET request may be replayed by net.http.Transport and
that will trigger a second update undoing the first. Using POST
disables all such retries.
Update #cleanup
Change-Id: I2f8b7c4d9e1a3b5c7d0e2f4a6b8c1d3e5f7a9b0c
Signed-off-by: Francois Marier <francois@tailscale.com>
This commit is contained in:
500 Internal Server Error
Gitea Version: 1.28.0+dev-477-g8b6ad49a5f