Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: Add Tailscale networking#3505

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
kylecarbs merged 66 commits intomainfromtailnet
Sep 1, 2022
Merged

feat: Add Tailscale networking#3505

kylecarbs merged 66 commits intomainfromtailnet
Sep 1, 2022

Conversation

kylecarbs
Copy link
Member

@kylecarbskylecarbs commentedAug 14, 2022
edited by matifali
Loading

Contributes to#2779. This adds Tailscale networking in addition to WebRTC. It is disabled by default, clients must opt-in (and it's hidden). The rollout plan is:

  1. Dogfood Tailscale networking for ~1 week.
  2. If all is stable and well, release with it as the default.
  3. Remove WebRTC networking the subsequent week.

The delta should be -3,000 lines of code 😎... not to mention so so so many bugs fixed.

Todo

  • Add a global toggle to enable Tailscale networking. This should also impact clients looking to create connections.
  • Refactor the workspace agent retry loop into an agent-client creator.
  • Makeagent.TailscaleConn.Ping() work!
  • RenameHTTPForTests in the Tailscale fork toForceHTTP.
  • The DERPMap should be fetched on agent reconnect.

Might do

  • Display connected regions with latencies in the UI.
  • Allow DERP URLs to be specified. This allows Tailscale's hosted DERP servers to be used with Coder,just like Headscale.

ntimo, bpmct, kconley-sq, and jsjoeio reacted with heart emoji
@kylecarbskylecarbs self-assigned thisAug 14, 2022
@coadler
Copy link
Contributor

@bpmct I think this is related to websockets being broken for the dev tunnel. Fixing this morning!

@kylecarbs
Copy link
MemberAuthor

@bpmct that issue you encountered with WebSockets has been fixed!

bpmct reacted with thumbs up emoji

@bpmct
Copy link
Member

bpmct commentedAug 30, 2022
edited
Loading

Did some tests and confirmed#3316 and the terminal hanging is resolved, the tunnel also works. 🎉 The first time I tried it, I did have to manually reload the pop-up window in order to get things to load, however. I have not been able to reproduce sense. Maybe it was a one-off error?

final_630e1f4ccd265a00839746cf_4775.mp4

I also see somewhat surprising logs, although things seem stable during code-server usage

coder server logs
2022-08-30 14:45:04.950 [DEBUG] (coderd.tailnet.wgengine)       <./tailnet/conn.go:515> Logger.func1    [v1] magicsock: disco: send, starting discovery for [0UbXg] (d:ecee900b5554b13b)2022-08-30 14:45:04.950 [DEBUG] (coderd.tailnet.wgengine)       <./tailnet/conn.go:515> Logger.func1    [v1] magicsock: disco: d:9100959705000a6e->d:ecee900b5554b13b ([0UbXg], 172.31.23.187:44809) sent ping tx=d5440625ea702022-08-30 14:45:04.950 [DEBUG] (coderd.tailnet.wgengine)       <./tailnet/conn.go:515> Logger.func1    [v1] magicsock: disco: d:9100959705000a6e->d:ecee900b5554b13b ([0UbXg], derp-999) sent call-me-maybe2022-08-30 14:45:07.417 [DEBUG] (coderd.tailnet.wgengine)       <./tailnet/conn.go:515> Logger.func1    [v1] magicsock: disco: timeout waiting for pong e1eb51c806ff from 54.202.2.137:44809 ([0UbXg], d:ecee900b5554b13b)2022-08-30 14:45:09.950 [DEBUG] (coderd.tailnet.wgengine)       <./tailnet/conn.go:515> Logger.func1    [v1] magicsock: disco: timeout waiting for pong d5440625ea70 from 172.31.23.187:44809 ([0UbXg], d:ecee900b5554b13b)2022-08-30 14:45:10.101 [DEBUG] (coderd.tailnet.wgengine)       <./tailnet/conn.go:515> Logger.func1    [v2] [0UbXg] - Handshake did not complete after 20 attempts, giving up2022-08-30 14:45:10.417 [DEBUG] (coderd.tailnet.wgengine)       <./tailnet/conn.go:515> Logger.func1    [v1] magicsock: disco: timeout waiting for pong 876e58d1e2fe from 54.202.2.137:44809 ([0UbXg], d:ecee900b5554b13b)2022-08-30 14:45:11.417 [DEBUG] (coderd.tailnet.wgengine)       <./tailnet/conn.go:515> Logger.func1    [v1] magicsock: disco: send, starting discovery for [0UbXg] (d:ecee900b5554b13b)2022-08-30 14:45:11.417 [DEBUG] (coderd.tailnet.wgengine)       <./tailnet/conn.go:515> Logger.func1    [v1] magicsock: disco: d:9100959705000a6e->d:ecee900b5554b13b ([0UbXg], derp-999) sent call-me-maybe2022-08-30 14:45:11.417 [DEBUG] (coderd.tailnet.wgengine)       <./tailnet/conn.go:515> Logger.func1    [v1] magicsock: disco: d:9100959705000a6e->d:ecee900b5554b13b ([0UbXg], 172.31.23.187:44809) sent ping tx=e7c2bc468d132022-08-30 14:45:13.417 [DEBUG] (coderd.tailnet.wgengine)       <./tailnet/conn.go:515> Logger.func1    [v1] magicsock: disco: timeout waiting for pong b2b58aa991fd from 54.202.2.137:44809 ([0UbXg], d:ecee900b5554b13b)2022-08-30 14:45:16.418 [DEBUG] (coderd.tailnet.wgengine)       <./tailnet/conn.go:515> Logger.func1    [v1] magicsock: disco: timeout waiting for pong 0a35d2c4b98a from 54.202.2.137:44809 ([0UbXg], d:ecee900b5554b13b)2022-08-30 14:45:16.418 [DEBUG] (coderd.tailnet.wgengine)       <./tailnet/conn.go:515> Logger.func1    [v1] magicsock: disco: timeout waiting for pong e7c2bc468d13 from 172.31.23.187:44809 ([0UbXg], d:ecee900b5554b13b)2022-08-30 14:45:17.419 [DEBUG] (coderd.tailnet.wgengine)       <./tailnet/conn.go:515> Logger.func1    [v1] magicsock: disco: send, starting discovery for [0UbXg] (d:ecee900b5554b13b)2022-08-30 14:45:17.419 [DEBUG] (coderd.tailnet.wgengine)       <./tailnet/conn.go:515> Logger.func1    [v1] magicsock: disco: d:9100959705000a6e->d:ecee900b5554b13b ([0UbXg], derp-999) sent call-me-maybe2022-08-30 14:45:17.419 [DEBUG] (coderd.tailnet.wgengine)       <./tailnet/conn.go:515> Logger.func1    [v1] magicsock: disco: d:9100959705000a6e->d:ecee900b5554b13b ([0UbXg], 172.31.23.187:44809) sent ping tx=ff3c81b956bf2022-08-30 14:45:19.362 [DEBUG] (coderd.tailnet.wgengine)       <./tailnet/conn.go:515> Logger.func1    [v1] magicsock: starting endpoint update (periodic)2022-08-30 14:45:19.380 [DEBUG] (coderd.tailnet.wgengine)       <./tailnet/conn.go:515> Logger.func1    netcheck: [v1] report: udp=true v6=true mapvarydest=false hair=true portmap= v4a=45.77.76.151:54499 v6a=[2001:19f0:5:278d:5400:3ff:feec:cd12]:54878 derp=2 derpdist=2v4:2ms,2v6:4ms,999v4:13ms2022-08-30 14:45:19.419 [DEBUG] (coderd.tailnet.wgengine)       <./tailnet/conn.go:515> Logger.func1    [v1] magicsock: disco: timeout waiting for pong d4889e9806c3 from 54.202.2.137:44809 ([0UbXg], d:ecee900b5554b13b)2022-08-30 14:45:20.006 [DEBUG] (coderd.tailnet.wgengine)       <./tailnet/conn.go:515> Logger.func1    [v1] magicsock: disco: d:4e92f14833ab99d7<-d:1911ac45e861ab0f ([XIv/+], derp-999)  got call-me-maybe, 2 endpoints2022-08-30 14:45:20.007 [DEBUG] (coderd.tailnet.wgengine)       <./tailnet/conn.go:515> Logger.func1    [v1] magicsock: disco: d:4e92f14833ab99d7->d:1911ac45e861ab0f ([XIv/+], 172.31.31.123:50234) sent ping tx=d898f99f3b8f2022-08-30 14:45:20.007 [DEBUG] (coderd.tailnet.wgengine)       <./tailnet/conn.go:515> Logger.func1    [v1] magicsock: disco: d:4e92f14833ab99d7->d:1911ac45e861ab0f ([XIv/+], 34.209.81.24:50234) sent ping tx=780aa0477bd92022-08-30 14:45:20.077 [DEBUG] (coderd.tailnet.wgengine)       <./tailnet/conn.go:515> Logger.func1    [v1] magicsock: disco: d:4e92f14833ab99d7<-d:1911ac45e861ab0f ([XIv/+], 34.209.81.24:50234)  got pong tx=780aa0477bd9 latency=70ms pong.src=45.77.76.151:544992022-08-30 14:45:22.419 [DEBUG] (coderd.tailnet.wgengine)       <./tailnet/conn.go:515> Logger.func1    [v1] magicsock: disco: timeout waiting for pong ff3c81b956bf from 172.31.23.187:44809 ([0UbXg], d:ecee900b5554b13b)2022-08-30 14:45:22.419 [DEBUG] (coderd.tailnet.wgengine)       <./tailnet/conn.go:515> Logger.func1    [v1] magicsock: disco: timeout waiting for pong ffd1a7a6e35a from 54.202.2.137:44809 ([0UbXg], d:ecee900b5554b13b)2022-08-30 14:45:23.421 [DEBUG] (coderd.tailnet.wgengine)       <./tailnet/conn.go:515> Logger.func1    [v1] magicsock: disco: send, starting discovery for [0UbXg] (d:ecee900b5554b13b)2022-08-30 14:45:23.421 [DEBUG] (coderd.tailnet.wgengine)       <./tailnet/conn.go:515> Logger.func1    [v1] magicsock: want call-me-maybe but endpoints stale; restunning2022-08-30 14:45:23.421 [DEBUG] (coderd.tailnet.wgengine)       <./tailnet/conn.go:515> Logger.func1    [v1] magicsock: starting endpoint update (refresh-for-peering)2022-08-30 14:45:23.421 [DEBUG] (coderd.tailnet.wgengine)       <./tailnet/conn.go:515> Logger.func1    [v1] magicsock: disco: d:9100959705000a6e->d:ecee900b5554b13b ([0UbXg], 172.31.23.187:44809) sent ping tx=63556f8eb5b62022-08-30 14:45:23.439 [DEBUG] (coderd.tailnet.wgengine)       <./tailnet/conn.go:515> Logger.func1    netcheck: [v1] report: udp=true v6=true mapvarydest=false hair=false portmap= v4a=45.77.76.151:45444 v6a=[2001:19f0:5:278d:5400:3ff:feec:cd12]:57772 derp=2 derpdist=2v4:4ms,2v6:4ms,999v4:13ms2022-08-30 14:45:23.446 [DEBUG] (coderd.tailnet.wgengine)       <./tailnet/conn.go:515> Logger.func1    [v1] magicsock: STUN done; sending call-me-maybe to d:ecee900b5554b13b [0UbXg]2022-08-30 14:45:23.447 [DEBUG] (coderd.tailnet.wgengine)       <./tailnet/conn.go:515> Logger.func1    [v1] magicsock: disco: d:9100959705000a6e->d:ecee900b5554b13b ([0UbXg], derp-999) sent call-me-maybe2022-08-30 14:45:25.269 [DEBUG] (coderd.tailnet.wgengine)       <./tailnet/conn.go:515> Logger.func1    [v2] [0UbXg] - Sending handshake initiation2022-08-30 14:45:25.420 [DEBUG] (coderd.tailnet.wgengine)       <./tailnet/conn.go:515> Logger.func1    [v1] magicsock: disco: timeout waiting for pong 502e159d8b35 from 54.202.2.137:44809 ([0UbXg], d:ecee900b5554b13b)2022-08-30 14:45:26.662 [DEBUG] (coderd.tailnet.wgengine)       <./tailnet/conn.go:515> Logger.func1    [v2] [XIv/+] - Sending keepalive packet2022-08-30 14:45:28.421 [DEBUG] (coderd.tailnet.wgengine)       <./tailnet/conn.go:515> Logger.func1    [v1] magicsock: disco: timeout waiting for pong 1b16dee1c80e from 54.202.2.137:44809 ([0UbXg], d:ecee900b5554b13b)2022-08-30 14:45:28.421 [DEBUG] (coderd.tailnet.wgengine)       <./tailnet/conn.go:515> Logger.func1    [v1] magicsock: disco: timeout waiting for pong 63556f8eb5b6 from 172.31.23.187:44809 ([0UbXg], d:ecee900b5554b13b)2022-08-30 14:45:28.779 [DEBUG] (coderd.tailnet.wgengine)       <./tailnet/conn.go:515> Logger.func1    magicsock: closing connection to derp-999 (idle), age 1m15s2022-08-30 14:45:28.779 [DEBUG] (coderd.tailnet.wgengine)       <./tailnet/conn.go:515> Logger.func1    magicsock: 1 active derp conns: derp-2=cr2m0s,wr2m0s2022-08-30 14:45:29.422 [DEBUG] (coderd.tailnet.wgengine)       <./tailnet/conn.go:515> Logger.func1    [v1] magicsock: disco: send, starting discovery for [0UbXg] (d:ecee900b5554b13b)2022-08-30 14:45:29.422 [DEBUG] (coderd.tailnet.wgengine)       <./tailnet/conn.go:515> Logger.func1    [v1] magicsock: disco: d:9100959705000a6e->d:ecee900b5554b13b ([0UbXg], derp-999) sent call-me-maybe2022-08-30 14:45:29.422 [DEBUG] (coderd.tailnet.wgengine)       <./tailnet/conn.go:515> Logger.func1    [v1] magicsock: disco: d:9100959705000a6e->d:ecee900b5554b13b ([0UbXg], 172.31.23.187:44809) sent ping tx=0efa516a0a642022-08-30 14:45:30.562 [DEBUG] (coderd.tailnet.wgengine)       <./tailnet/conn.go:515> Logger.func1    [v2] [0UbXg] - Handshake did not complete after 5 seconds, retrying (try 2)
kylecarbs reacted with thumbs up emoji

@kylecarbskylecarbs marked this pull request as ready for reviewAugust 31, 2022 20:59
@kylecarbskylecarbs requested a review froma team as acode ownerAugust 31, 2022 20:59
@kylecarbskylecarbs requested review fromcode-asher and removed request fora teamAugust 31, 2022 20:59
@kylecarbskylecarbs merged commit9bd83e5 intomainSep 1, 2022
@kylecarbskylecarbs deleted the tailnet branchSeptember 1, 2022 01:09
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@bpmctbpmctbpmct left review comments

@coadlercoadlercoadler approved these changes

@code-ashercode-asherAwaiting requested review from code-ashercode-asher was automatically assigned from coder/ts

Assignees

@kylecarbskylecarbs

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@kylecarbs@coadler@bpmct

[8]ページ先頭

©2009-2025 Movatter.jp