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

Commitfbe2fa6

Browse files
chore: add test for coord rolling restart (#14680)
Closescoder/internal#50---------Co-authored-by: Ethan Dickson <ethan@coder.com>
1 parent9e63caf commitfbe2fa6

File tree

4 files changed

+348
-6
lines changed

4 files changed

+348
-6
lines changed

‎coderd/coderd.go‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1485,9 +1485,6 @@ func (api *API) Close() error {
14851485
default:
14861486
api.cancel()
14871487
}
1488-
ifapi.derpCloseFunc!=nil {
1489-
api.derpCloseFunc()
1490-
}
14911488

14921489
wsDone:=make(chanstruct{})
14931490
timer:=time.NewTimer(10*time.Second)
@@ -1513,11 +1510,16 @@ func (api *API) Close() error {
15131510
api.updateChecker.Close()
15141511
}
15151512
_=api.workspaceAppServer.Close()
1513+
_=api.agentProvider.Close()
1514+
ifapi.derpCloseFunc!=nil {
1515+
api.derpCloseFunc()
1516+
}
1517+
// The coordinator should be closed after the agent provider, and the DERP
1518+
// handler.
15161519
coordinator:=api.TailnetCoordinator.Load()
15171520
ifcoordinator!=nil {
15181521
_= (*coordinator).Close()
15191522
}
1520-
_=api.agentProvider.Close()
15211523
_=api.statsReporter.Close()
15221524
_=api.NetworkTelemetryBatcher.Close()
15231525
_=api.OIDCConvertKeyCache.Close()

‎coderd/tailnet.go‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ func NewServerTailnet(
7575
// given in this callback, it's only valid while connecting.
7676
ifderpServer!=nil {
7777
conn.SetDERPRegionDialer(func(_ context.Context,region*tailcfg.DERPRegion) net.Conn {
78-
if!region.EmbeddedRelay {
78+
// Don't set up the embedded relay if we're shutting down
79+
if!region.EmbeddedRelay||ctx.Err()!=nil {
7980
returnnil
8081
}
8182
logger.Debug(ctx,"connecting to embedded DERP via in-memory pipe")

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp