Commit Graph

11 Commits

Author SHA1 Message Date
d27076cac7 fix: Improve coder server shutdown procedure (#3246)
* fix: Improve `coder server` shutdown procedure

This commit improves the `coder server` shutdown procedure so that all
triggers for shutdown do so in a graceful way without skipping any
steps.

We also improve cancellation and shutdown of services by ensuring
resources are cleaned up at the end.

Notable changes:
- We wrap `cmd.Context()` to allow us to control cancellation better
- We attempt graceful shutdown of the http server (`server.Shutdown`)
  because it's less abrupt (compared to `shutdownConns`)
- All exit paths share the same shutdown procedure (except for early
  exit)
- `provisionerd`s are now shutdown concurrently instead of one at a
  time, the also now get a new context for shutdown because
  `cmd.Context()` may be cancelled
- Resources created by `newProvisionerDaemon` are cleaned up
- Lifecycle `Executor` exits its goroutine on context cancellation

Fixes #3245
2022-07-27 18:21:21 +03:00
bb05b1f749 fix: Use slog for devtunnel logging (#3248)
Ensures standardized logging for server.
2022-07-27 18:05:47 +03:00
fa4361db76 restore devtunnel test (#3050)
* Dev tunnel test uses local fake server; fixed port

Signed-off-by: Spike Curtis <spike@coder.com>

* Remove parallel for test

Signed-off-by: Spike Curtis <spike@coder.com>

* Fix segfault
2022-07-22 08:26:39 -07:00
92ebdaec5a feat: force legacy tunnels to new version (#2914) 2022-07-12 00:33:35 +00:00
482feef373 feat(devtunnel): support geodistributed tunnels (#2711) 2022-06-30 19:11:13 -05:00
c36b0d892b fix(devtunnel): use 1280 mtu (#2420)
This should be more compatible with cloud VMs and VPNs.
2022-06-16 12:12:04 -05:00
8415022bf9 fix(devtunnel): close http.Server before wireguard interface (#2263) 2022-06-10 23:40:33 +00:00
de6f86bf7a fix: ensure config dir exists before reading tunnel config (#2259) 2022-06-10 21:42:55 +00:00
f562b74fa1 feat: use custom wireguard reverse proxy for dev tunnel (#1975) 2022-06-10 13:38:11 -05:00
d135f85f69 fix: use correct devnull device on windows for proxy logs (#1803) 2022-05-26 15:21:36 -05:00
fed02cdcdc chore: replace cloudflare dev tunnel with frp (#867) 2022-04-14 11:29:40 -04:00