Skip to content

test flake: scaletest: Test_Runner/NoCleanup: peer is connected directly #10791

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
johnstcn opened this issue Nov 20, 2023 · 1 comment · Fixed by #12138
Closed

test flake: scaletest: Test_Runner/NoCleanup: peer is connected directly #10791

johnstcn opened this issue Nov 20, 2023 · 1 comment · Fixed by #12138
Assignees

Comments

@johnstcn
Copy link
Member

johnstcn commented Nov 20, 2023

Apparently if both peers are on the same net with no endpoints they can still just end up connecting directly.

Seen here: https://github.com/coder/coder/actions/runs/6931328284/job/18852836455?pr=10790

Error:

    run_test.go:436: 
        	Error Trace:	/Users/runner/work/coder/coder/scaletest/createworkspaces/run_test.go:436
        	Error:      	Received unexpected error:
        	            	run workspace connections in parallel:
        	            	    github.com/coder/coder/v2/scaletest/createworkspaces.(*Runner).Run
        	            	        /Users/runner/work/coder/coder/scaletest/createworkspaces/run.go:172
        	            	  - run agent connection:
        	            	    github.com/coder/coder/v2/scaletest/createworkspaces.(*Runner).Run.func2
        	            	        /Users/runner/work/coder/coder/scaletest/createworkspaces/run.go:163
        	            	  - check connection mode: peer is connected directly, not via DERP:
        	            	    github.com/coder/coder/v2/scaletest/agentconn.(*Runner).Run
        	            	        /Users/runner/work/coder/coder/scaletest/agentconn/run.go:96
        	Test:       	Test_Runner/NoCleanup

https://github.com/coder/coder/blob/main/scaletest/agentconn/run.go#L96

	// Ensure DERP for completeness.
	if r.cfg.ConnectionMode == ConnectionModeDerp {
		status := conn.Status()
		if len(status.Peers()) != 1 {
			return xerrors.Errorf("check connection mode: expected 1 peer, got %d", len(status.Peers()))
		}
		peer := status.Peer[status.Peers()[0]]
		if peer.Relay == "" || peer.CurAddr != "" {
			return xerrors.Errorf("check connection mode: peer is connected directly, not via DERP")
		}
	}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants