forked fromcoder/coder
- Notifications
You must be signed in to change notification settings - Fork0
Commit2df9a3e
authored
fix: fix tailnet remoteCoordination to wait for server (coder#14666)
Fixescoder#12560When gracefully disconnecting from the coordinator, we would send the Disconnect message and then close the dRPC stream. However, closing the dRPC stream can cause the server not to process the Disconnect message, since we use the stream context in a `select` while sending it to the coordinator.This is a product bug uncovered by the flake, and probably results in us failing graceful disconnect some minority of the time.Instead, the `remoteCoordination` (and `inMemoryCoordination` for consistency) should send the Disconnect message and then wait for the coordinator to hang up (on some graceful disconnect timer, in the form of a context).1 parent7ea8a22 commit2df9a3e
File tree
7 files changed
+72
-49
lines changed- agent
- codersdk/workspacesdk
- tailnet
- test/integration
7 files changed
+72
-49
lines changedLines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1357 | 1357 |
| |
1358 | 1358 |
| |
1359 | 1359 |
| |
1360 |
| - | |
| 1360 | + | |
1361 | 1361 |
| |
1362 | 1362 |
| |
1363 | 1363 |
| |
|
Lines changed: 6 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1896 | 1896 |
| |
1897 | 1897 |
| |
1898 | 1898 |
| |
1899 |
| - | |
| 1899 | + | |
| 1900 | + | |
| 1901 | + | |
1900 | 1902 |
| |
1901 | 1903 |
| |
1902 | 1904 |
| |
| |||
2384 | 2386 |
| |
2385 | 2387 |
| |
2386 | 2388 |
| |
2387 |
| - | |
| 2389 | + | |
| 2390 | + | |
| 2391 | + | |
2388 | 2392 |
| |
2389 | 2393 |
| |
2390 | 2394 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
277 | 277 |
| |
278 | 278 |
| |
279 | 279 |
| |
280 |
| - | |
| 280 | + | |
281 | 281 |
| |
282 | 282 |
| |
283 | 283 |
| |
|
Lines changed: 4 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
57 | 57 |
| |
58 | 58 |
| |
59 | 59 |
| |
60 |
| - | |
| 60 | + | |
61 | 61 |
| |
62 | 62 |
| |
63 | 63 |
| |
| |||
82 | 82 |
| |
83 | 83 |
| |
84 | 84 |
| |
85 |
| - | |
| 85 | + | |
| 86 | + | |
86 | 87 |
| |
87 | 88 |
| |
88 | 89 |
| |
| |||
108 | 109 |
| |
109 | 110 |
| |
110 | 111 |
| |
| 112 | + | |
111 | 113 |
| |
112 | 114 |
| |
113 | 115 |
| |
|
Lines changed: 34 additions & 23 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
91 | 91 |
| |
92 | 92 |
| |
93 | 93 |
| |
94 |
| - | |
| 94 | + | |
95 | 95 |
| |
96 | 96 |
| |
97 | 97 |
| |
| |||
106 | 106 |
| |
107 | 107 |
| |
108 | 108 |
| |
109 |
| - | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
110 | 113 |
| |
111 | 114 |
| |
112 | 115 |
| |
113 | 116 |
| |
114 | 117 |
| |
115 | 118 |
| |
116 | 119 |
| |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
117 | 132 |
| |
118 | 133 |
| |
119 | 134 |
| |
| |||
240 | 255 |
| |
241 | 256 |
| |
242 | 257 |
| |
243 |
| - | |
244 | 258 |
| |
245 | 259 |
| |
246 | 260 |
| |
| |||
280 | 294 |
| |
281 | 295 |
| |
282 | 296 |
| |
283 |
| - | |
284 | 297 |
| |
285 | 298 |
| |
286 | 299 |
| |
| |||
328 | 341 |
| |
329 | 342 |
| |
330 | 343 |
| |
331 |
| - | |
332 |
| - | |
333 |
| - | |
334 |
| - | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
335 | 349 |
| |
336 |
| - | |
337 |
| - | |
338 |
| - | |
339 |
| - | |
340 |
| - | |
341 |
| - | |
342 |
| - | |
343 |
| - | |
344 |
| - | |
345 |
| - | |
346 |
| - | |
347 | 350 |
| |
348 | 351 |
| |
| 352 | + | |
349 | 353 |
| |
350 | 354 |
| |
351 | 355 |
| |
| |||
355 | 359 |
| |
356 | 360 |
| |
357 | 361 |
| |
358 |
| - | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
359 | 366 |
| |
360 | 367 |
| |
361 | 368 |
| |
| |||
364 | 371 |
| |
365 | 372 |
| |
366 | 373 |
| |
367 |
| - | |
368 |
| - | |
369 | 374 |
| |
370 |
| - | |
| 375 | + | |
371 | 376 |
| |
372 | 377 |
| |
373 | 378 |
| |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
374 | 385 |
| |
375 | 386 |
| |
376 | 387 |
| |
|
Lines changed: 23 additions & 19 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2 | 2 |
| |
3 | 3 |
| |
4 | 4 |
| |
| 5 | + | |
5 | 6 |
| |
6 | 7 |
| |
7 | 8 |
| |
| |||
284 | 285 |
| |
285 | 286 |
| |
286 | 287 |
| |
287 |
| - | |
| 288 | + | |
288 | 289 |
| |
289 | 290 |
| |
290 | 291 |
| |
| |||
336 | 337 |
| |
337 | 338 |
| |
338 | 339 |
| |
339 |
| - | |
| 340 | + | |
340 | 341 |
| |
341 | 342 |
| |
342 | 343 |
| |
343 |
| - | |
344 |
| - | |
345 |
| - | |
346 |
| - | |
347 |
| - | |
348 |
| - | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
349 | 347 |
| |
350 | 348 |
| |
351 | 349 |
| |
| |||
388 | 386 |
| |
389 | 387 |
| |
390 | 388 |
| |
391 |
| - | |
| 389 | + | |
392 | 390 |
| |
393 | 391 |
| |
394 | 392 |
| |
| |||
411 | 409 |
| |
412 | 410 |
| |
413 | 411 |
| |
414 |
| - | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
415 | 417 |
| |
416 |
| - | |
417 |
| - | |
418 |
| - | |
419 |
| - | |
420 |
| - | |
421 |
| - | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
422 | 421 |
| |
423 | 422 |
| |
424 | 423 |
| |
| |||
464 | 463 |
| |
465 | 464 |
| |
466 | 465 |
| |
467 |
| - | |
468 |
| - | |
469 |
| - | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
470 | 470 |
| |
471 | 471 |
| |
472 | 472 |
| |
473 | 473 |
| |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
474 | 478 |
| |
475 | 479 |
| |
476 | 480 |
| |
|
Lines changed: 3 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
469 | 469 |
| |
470 | 470 |
| |
471 | 471 |
| |
472 |
| - | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
473 | 475 |
| |
474 | 476 |
| |
475 | 477 |
| |
|
0 commit comments
Comments
(0)