Skip to content

fix: upgrade tailscale to fix STUN probes on dual stack #10535

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions coderd/healthcheck/derphealth/derp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ func TestDERP(t *testing.T) {
assert.True(t, node.CanExchangeMessages)
assert.NotEmpty(t, node.RoundTripPing)
assert.Len(t, node.ClientLogs, 2)
assert.Len(t, node.ClientLogs[0], 1)
assert.Len(t, node.ClientLogs[0], 3)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note: extra logs come from coder/tailscale#41

assert.Len(t, node.ClientErrs[0], 0)
assert.Len(t, node.ClientLogs[1], 1)
assert.Len(t, node.ClientLogs[1], 3)
assert.Len(t, node.ClientErrs[1], 0)

assert.False(t, node.STUN.Enabled)
Expand Down Expand Up @@ -113,9 +113,11 @@ func TestDERP(t *testing.T) {
assert.True(t, node.CanExchangeMessages)
assert.NotEmpty(t, node.RoundTripPing)
assert.Len(t, node.ClientLogs, 2)
assert.Len(t, node.ClientLogs[0], 1)
// the exact number of logs depends on the certificates, which we don't control.
assert.GreaterOrEqual(t, len(node.ClientLogs[0]), 1)
assert.Len(t, node.ClientErrs[0], 0)
assert.Len(t, node.ClientLogs[1], 1)
// the exact number of logs depends on the certificates, which we don't control.
assert.GreaterOrEqual(t, len(node.ClientLogs[1]), 1)
assert.Len(t, node.ClientErrs[1], 0)

assert.True(t, node.STUN.Enabled)
Expand All @@ -125,7 +127,7 @@ func TestDERP(t *testing.T) {
}
})

t.Run("ForceWebsockets", func(t *testing.T) {
t.Run("FailoverToWebsockets", func(t *testing.T) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"ForceWebsockets" is a setting that makes it not even attempt regular DERP upgrade. Here we try Upgrade: DERP, get rejected, and then failover to websockets.

t.Parallel()

derpSrv := derp.NewServer(key.NewNode(), func(format string, args ...any) { t.Logf(format, args...) })
Expand Down Expand Up @@ -176,8 +178,8 @@ func TestDERP(t *testing.T) {
assert.True(t, node.CanExchangeMessages)
assert.NotEmpty(t, node.RoundTripPing)
assert.Len(t, node.ClientLogs, 2)
assert.Len(t, node.ClientLogs[0], 3)
assert.Len(t, node.ClientLogs[1], 3)
assert.Len(t, node.ClientLogs[0], 5)
assert.Len(t, node.ClientLogs[1], 5)
assert.Len(t, node.ClientErrs, 2)
assert.Len(t, node.ClientErrs[0], 1) // this
assert.Len(t, node.ClientErrs[1], 1)
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ replace github.com/dlclark/regexp2 => github.com/dlclark/regexp2 v1.7.0

// There are a few minor changes we make to Tailscale that we're slowly upstreaming. Compare here:
// https://github.com/tailscale/tailscale/compare/main...coder:tailscale:main
replace tailscale.com => github.com/coder/tailscale v1.1.1-0.20231030172646-324d125f1d8f
replace tailscale.com => github.com/coder/tailscale v1.1.1-0.20231106123012-ba3acaa26275

// Fixes a race-condition in coder/wgtunnel.
// Upstream PR: https://github.com/WireGuard/wireguard-go/pull/85
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,8 @@ github.com/coder/retry v1.4.0 h1:g0fojHFxcdgM3sBULqgjFDxw1UIvaCqk4ngUDu0EWag=
github.com/coder/retry v1.4.0/go.mod h1:blHMk9vs6LkoRT9ZHyuZo360cufXEhrxqvEzeMtRGoY=
github.com/coder/ssh v0.0.0-20230621095435-9a7e23486f1c h1:TI7TzdFI0UvQmwgyQhtI1HeyYNRxAQpr8Tw/rjT8VSA=
github.com/coder/ssh v0.0.0-20230621095435-9a7e23486f1c/go.mod h1:aGQbuCLyhRLMzZF067xc84Lh7JDs1FKwCmF1Crl9dxQ=
github.com/coder/tailscale v1.1.1-0.20231030172646-324d125f1d8f h1:M+UeuoMLQeduc1tXB4VuOAXBLHGrsl9YCo8MuGqbgD4=
github.com/coder/tailscale v1.1.1-0.20231030172646-324d125f1d8f/go.mod h1:L8tPrwSi31RAMEMV8rjb0vYTGs7rXt8rAHbqY/p41j4=
github.com/coder/tailscale v1.1.1-0.20231106123012-ba3acaa26275 h1:FhaWxLBGCPaX6+0yRy98OrmsDK6mr/jvwBilCW42otE=
github.com/coder/tailscale v1.1.1-0.20231106123012-ba3acaa26275/go.mod h1:L8tPrwSi31RAMEMV8rjb0vYTGs7rXt8rAHbqY/p41j4=
github.com/coder/terraform-provider-coder v0.12.2 h1:KsnJLHyTtELvV1Rzkm75iCQ7npXjL0KcoU3NTreagZU=
github.com/coder/terraform-provider-coder v0.12.2/go.mod h1:+BHer8AX5Y0QqZS9viau+ZkDTaOCOE3ga1lx1QIJDrk=
github.com/coder/wgtunnel v0.1.12 h1:j3v1Q7qyplrRyyNPm0DK50d3O3flboIErxBFhm4NCkA=
Expand Down