Dean Sheather
d2f22b063a
fix: move STUN servers into their own regions ( #9030 )
2023-08-11 05:04:17 +10:00
Colin Adler
bc862fa493
chore: upgrade tailscale to v1.46.1 ( #8913 )
2023-08-09 19:50:26 +00:00
Dean Sheather
3c52b01850
chore: add tailscale magicsock debug logging controls ( #8982 )
2023-08-08 17:56:08 +00:00
Colin Adler
758c368222
chore: fix TestTailnet/ForcesWebSockets flake ( #8953 )
2023-08-07 21:17:39 -05:00
Dean Sheather
c575292ba6
fix: fix tailnet netcheck issues ( #8802 )
2023-08-02 01:50:43 +10:00
Colin Adler
0b4f333a6f
chore: add http debug support to pgcoord ( #8795 )
2023-07-28 17:59:31 -05:00
Colin Adler
dd2f79995b
chore(tailnet): rewrite coordinator debug using html/template ( #8752 )
2023-07-26 22:54:21 +00:00
Ammar Bandukwala
25e30c6f41
feat(cli): support fine-grained server log filtering ( #8748 )
2023-07-26 16:46:22 -05:00
Colin Adler
6b92abebb9
fix(tailnet): track agent names for http debug ( #8744 )
2023-07-26 18:44:10 +00:00
Dean Sheather
2f0a9996e7
chore: add derpserver to wsproxy, add proxies to derpmap ( #7311 )
2023-07-27 02:21:04 +10:00
Colin Adler
517fb19474
feat: add single tailnet support to moons ( #8587 )
2023-07-19 11:11:11 -05:00
Colin Adler
c47b78c44b
chore: replace wsconncache with a single tailnet ( #8176 )
2023-07-12 17:37:31 -05:00
Spike Curtis
c0a01ec81c
fix: fix TestPGCoordinatorDual_Mainline flake ( #8228 )
...
* fix TestPGCoordinatorDual_Mainline flake
Signed-off-by: Spike Curtis <spike@coder.com >
* use slices.Contains instead of local function
Signed-off-by: Spike Curtis <spike@coder.com >
---------
Signed-off-by: Spike Curtis <spike@coder.com >
2023-06-28 11:37:45 +04:00
Kyle Carberry
f40865bc2f
chore: use mutex around blockEndpoints ( #8209 )
...
https://github.com/coder/coder/actions/runs/5378950122/jobs/9759972142
2023-06-26 10:01:50 -05:00
Dean Sheather
a28d422c35
feat: add flag to disable all direct connections ( #7936 )
2023-06-21 22:02:05 +00:00
Spike Curtis
cc17d2feea
refactor: add postgres tailnet coordinator ( #8044 )
...
* postgres tailnet coordinator
Signed-off-by: Spike Curtis <spike@coder.com >
* Fix db migration; tests
Signed-off-by: Spike Curtis <spike@coder.com >
* Add fixture, regenerate
Signed-off-by: Spike Curtis <spike@coder.com >
* Fix fixtures
Signed-off-by: Spike Curtis <spike@coder.com >
* review comments, run clean gen
Signed-off-by: Spike Curtis <spike@coder.com >
* Rename waitForConn -> cleanupConn
Signed-off-by: Spike Curtis <spike@coder.com >
* code review updates
Signed-off-by: Spike Curtis <spike@coder.com >
* db migration order
Signed-off-by: Spike Curtis <spike@coder.com >
* fix log field name last_heartbeat
Signed-off-by: Spike Curtis <spike@coder.com >
* fix heartbeat_from log field
Signed-off-by: Spike Curtis <spike@coder.com >
* fix slog fields for linting
Signed-off-by: Spike Curtis <spike@coder.com >
---------
Signed-off-by: Spike Curtis <spike@coder.com >
2023-06-21 16:20:58 +04:00
Marcin Tojek
b1d1b63113
chore: ensure logs consistency across Coder ( #8083 )
2023-06-20 12:30:45 +02:00
Marcin Tojek
247f8a973f
feat: replace ssh maxTimeout with keep-alive mechanism ( #8062 )
...
* Bump up coder/ssh
* feat: Set default agent timeout to ~72h
* Address PR comments
* Fix
2023-06-16 15:22:18 +02:00
Spike Curtis
dc3d39baf8
fix: agent disconnects from coordinator ( #7430 )
...
* work around websocket deadline bug
Signed-off-by: Spike Curtis <spike@coder.com >
* Use test context to hold websocket open
Signed-off-by: Spike Curtis <spike@coder.com >
* Fix race creating test websocket
Signed-off-by: Spike Curtis <spike@coder.com >
* set write deadline to time.Time zero
Signed-off-by: Spike Curtis <spike@coder.com >
---------
Signed-off-by: Spike Curtis <spike@coder.com >
2023-05-05 20:29:03 +04:00
Spike Curtis
b3689c8f64
Only send tailnet nodes updates with preferred DERP ( #7387 )
...
Signed-off-by: Spike Curtis <spike@coder.com >
2023-05-04 14:30:57 +04:00
Spike Curtis
bd630113b2
fix: coordinator node update race ( #7345 )
...
* fix: coordinator node update race
Signed-off-by: Spike Curtis <spike@coder.com >
* Lint fixes, make core private
Signed-off-by: Spike Curtis <spike@coder.com >
* Don't log broken connections as errors
Signed-off-by: Spike Curtis <spike@coder.com >
---------
Signed-off-by: Spike Curtis <spike@coder.com >
2023-05-02 20:58:21 +04:00
Spike Curtis
b6666cf1cf
chore: tailnet debug logging ( #7260 )
...
* Enable discovery (disco) debug
Signed-off-by: Spike Curtis <spike@coder.com >
* Better debug on reconnectingPTY
Signed-off-by: Spike Curtis <spike@coder.com >
* Agent logging in appstest
Signed-off-by: Spike Curtis <spike@coder.com >
* More reconnectingPTY logging
Signed-off-by: Spike Curtis <spike@coder.com >
* Add logging to coordinator
Signed-off-by: Spike Curtis <spike@coder.com >
* Update agent/agent.go
Co-authored-by: Mathias Fredriksson <mafredri@gmail.com >
* Update agent/agent.go
Co-authored-by: Mathias Fredriksson <mafredri@gmail.com >
* Update agent/agent.go
Co-authored-by: Mathias Fredriksson <mafredri@gmail.com >
* Update agent/agent.go
Co-authored-by: Mathias Fredriksson <mafredri@gmail.com >
* Clarify logs; remove unrelated changes
Signed-off-by: Spike Curtis <spike@coder.com >
---------
Signed-off-by: Spike Curtis <spike@coder.com >
Co-authored-by: Mathias Fredriksson <mafredri@gmail.com >
2023-04-27 13:59:01 +04:00
Colin Adler
3eb7f06bf1
feat(agent): add http debug routes for magicsock ( #7287 )
2023-04-26 13:01:49 -05:00
Colin Adler
745868fd8a
revert: chore: upgrade tailscale ( #7236 )
2023-04-20 17:58:22 -05:00
Colin Adler
a86830a283
chore: upgrade tailscale ( #7207 )
2023-04-20 13:29:56 -05:00
Colin Adler
fbf329fbb7
fix(tailnet): set TCP keepalive idle to 72 hours for SSH conns ( #7196 )
2023-04-18 17:53:11 -05:00
Kyle Carberry
bc18f6c113
fix: add CODER_AGENT_TAILNET_LISTEN_PORT for specifying a static tailnet port ( #6980 )
...
Fixes #5175 .
2023-04-03 16:20:19 +00:00
Kyle Carberry
ad0c0df104
chore: update tailscale to fix http2 upgrade ( #6811 )
...
See https://github.com/coder/tailscale/pull/15
2023-03-27 14:22:11 -05:00
Kyle Carberry
d7d210de36
Revert "chore: update tailscale to fix http2 upgrade ( #6761 )" ( #6779 )
...
This reverts commit 622fc6d9c2 .
2023-03-24 12:40:05 -05:00
Kyle Carberry
622fc6d9c2
chore: update tailscale to fix http2 upgrade ( #6761 )
...
See https://github.com/coder/tailscale/pull/15
2023-03-24 11:20:21 -05:00
Ammar Bandukwala
2bd6d2908e
feat: convert entire CLI to clibase ( #6491 )
...
I'm sorry.
2023-03-23 17:42:20 -05:00
Josh Vawdrey
97f77c4507
feat: allow DERP headers to be set ( #6572 )
...
* feat: allow DERP headers to be set
* chore: remove custom flag
* Clone DERP header on client create
* Adjust to use interface to cast headers
---------
Co-authored-by: Kyle Carberry <kyle@carberry.com >
2023-03-21 18:43:20 +00:00
Kyle Carberry
17bc5794d4
fix: direct embedded derp traffic directly to the server ( #6595 )
...
Prior to this change, DERP traffic would route from `coderd` to the
`CODER_ACCESS_URL` to reach the internal DERP server, which may have
resulted in slower connections due to proxying, or the failure of
web traffic entirely.
If your Coder deployment has a proxy in front of it, your traffic through
web terminals, apps, and port-forwarding is about to get a lot faster!
2023-03-14 14:46:47 +00:00
Kyle Carberry
7a8ccda40e
chore: copy forced derp websockets to fix flake ( #6475 )
...
See: https://github.com/coder/coder/actions/runs/4350034299/jobs/7600478389
2023-03-06 21:29:41 -06:00
Kyle Carberry
2ff1c6d613
feat: add agent stats for different connection types ( #6412 )
...
This allows us to track when our extensions are used, when the
web terminal is used, and average connection latency to the agent.
2023-03-02 08:06:00 -06:00
Kyle Carberry
1724cbf872
feat: automatically use websockets if DERP upgrade is unavailable ( #6381 )
...
* feat: automatically use websockets if DERP upgrade is unavailable
This might be our biggest hangup for deployments at the moment...
Load balancers by default do not support the DERP protocol, so many
of our prospects and customers run into failing workspace connections.
This automatically swaps to use WebSockets, and reports the reason to
coderd.
In a future contribution, a warning will appear by the agent if it was
forced to use WebSockets instead of DERP.
* Fix nil pointer type in Tailscale dep
* Fix requested changes
2023-03-01 22:18:14 +00:00
Mathias Fredriksson
cae8b88f60
fix(tailnet): Avoid logging netmap ( #6342 )
2023-02-25 08:06:38 +00:00
Mathias Fredriksson
677721e4a1
fix(tailnet): Skip nodes without DERP, avoid use of RemoveAllPeers ( #6320 )
...
* fix(tailnet): Skip nodes without DERP, avoid use of RemoveAllPeers
2023-02-24 18:16:29 +02:00
Mathias Fredriksson
a414de9e81
fix(tailnet): Improve tailnet setup and agentconn stability ( #6292 )
...
* fix(tailnet): Improve start and close to detect connection races
* fix: Prevent agentConn use before ready via AwaitReachable
* fix(tailnet): Ensure connstats are closed on conn close
* fix(codersdk): Use AwaitReachable in DialWorkspaceAgent
* fix(tailnet): Improve logging via slog.Helper()
2023-02-24 13:11:28 +02:00
Ammar Bandukwala
f05609b4da
chore: format Go more aggressively
2023-02-18 18:32:09 -06:00
Colin Adler
a54de6093b
feat: add coder ping ( #6161 )
2023-02-13 10:38:00 -06:00
Kyle Carberry
c0c83f17b2
fix: follow tailscale idioms for when to update nodes ( #6164 )
2023-02-10 16:59:24 -06:00
Colin Adler
4432cd08d6
chore: update tailscale ( #6091 )
2023-02-09 21:43:18 -06:00
Kyle Carberry
026b1cd2a4
chore: update to go 1.20 ( #5968 )
...
Co-authored-by: Colin Adler <colin1adler@gmail.com >
2023-02-02 12:36:27 -06:00
Colin Adler
cc694a55bc
feat: add debug info to HA coordinator ( #5883 )
2023-01-26 16:32:38 -06:00
Colin Adler
52ecd35c8f
fix(wsconncache): only allow one peer per connection ( #5886 )
...
If an agent went away and reconnected, the wsconncache connection would
be polluted for about 10m because there would be two peers with the
same IP. The old peer always had priority, which caused the dashboard to
try and always dial the old peer until it was removed.
Fixes: https://github.com/coder/coder/issues/5292
2023-01-26 22:23:35 +00:00
Colin Adler
dd8eab5675
fix: cache disconnected agent names in tailnet coordinator debug ( #5870 )
2023-01-25 21:23:14 -06:00
Colin Adler
233492b75d
fix: ensure coordinator debug output is always sorted ( #5867 )
2023-01-26 00:29:51 +00:00
Colin Adler
1cd5f38cb0
feat: add debug server for tailnet coordinators ( #5861 )
...
Implements a Tailscale-like debug server for our in-memory coordinator. This should provide some visibility into why connections could be failing.
Resolves: https://github.com/coder/coder/issues/5845

2023-01-25 21:27:36 +00:00
Colin Adler
c3731a1be0
fix: ensure agent websocket only removes its own conn ( #5828 )
2023-01-23 17:22:34 -06:00