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

fix: use TSMP for pings and checking reachability#11306

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
spikecurtis merged 2 commits intomainfromspike/tsmp-ping
Jan 2, 2024

Conversation

spikecurtis
Copy link
Contributor

@spikecurtisspikecurtis commentedDec 21, 2023
edited
Loading

We're seeing some flaky tests related to agent connectivity -https://github.com/coder/coder/actions/runs/7286675441/job/19856270998

I'm pretty sure what happened in this one is that the client opened a connection while the wgengine was in the process of reconfiguring the wireguard device, so the fact that the peer became "active" as a result of traffic being sent was not noticed.

The test callsAwaitReachable() but this only tests the disco layer, so it doesn't wait for wireguard to come up.

I think we should be using TSMP for pinging and reachability, since this operates at the IP layer, and therefore requires that wireguard comes up before being successful.

This should also help with the problems we have seen where a TCP connection starts before wireguard is up and the initial round trip has to wait for the 5 second wireguard handshake retry.

fixes:#11294

@spikecurtisGraphite App
Copy link
ContributorAuthor

Current dependencies on/for this PR:

Thisstack of pull requests is managed byGraphite.

@spikecurtisspikecurtisforce-pushed thespike/tsmp-ping branch 2 times, most recently from5933e85 to0576b65CompareJanuary 2, 2024 05:49
Signed-off-by: Spike Curtis <spike@coder.com>
@@ -186,7 +186,7 @@ func TestAgent_Stats_Magic(t *testing.T) {
// If it isn't, it's set to -1.
s.ConnectionMedianLatencyMS >= 0
}, testutil.WaitLong, testutil.IntervalFast,
"never saw stats: %+v", s,
"never saw stats",
Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

This gives misleading information since the pointer is passed on the initial call toEventually. It is not updated since<-stats returns a new pointer, rather than updating the data at the old pointer. Changed in favor of logging the relevant info as we get it.

s, ok := <-stats
t.Logf("got stats after disconnect %t, %d",
ok, s.SessionCountJetBrains)
return ok &&
Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

TSMP ping counts as a "connection" in the agent stats so it never goes to zero. I'm not sure why we were testing it going to zero in the first place@code-asher

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I think we wanted to make sureConnectionCount was also updating correctly, but did not realize there would be other connections going on.

@spikecurtisspikecurtis merged commit520c3a8 intomainJan 2, 2024
@spikecurtisspikecurtis deleted the spike/tsmp-ping branchJanuary 2, 2024 11:53
@spikecurtisGraphite App
Copy link
ContributorAuthor

Merge activity

@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsJan 2, 2024
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@code-ashercode-ashercode-asher left review comments

@coadlercoadlercoadler approved these changes

@deansheatherdeansheatherdeansheather approved these changes

Assignees

@spikecurtisspikecurtis

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

flake: TestPortForward/UDP_OnePort - EOF
4 participants
@spikecurtis@coadler@deansheather@code-asher

[8]ページ先頭

©2009-2025 Movatter.jp