Skip to content
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

fix flaking auth member remove test #15580

Merged

Conversation

chaochn47
Copy link
Member

@chaochn47 chaochn47 commented Mar 28, 2023

Before the fix,

taskset -c 1 go test -v -failfast -count 100 -run TestAuthMemberRemove --tags integration

can reproduce the error.

It was reported in the Mesure Test Flakiness workflow

Please read https://github.com/etcd-io/etcd/blob/main/CONTRIBUTING.md#contribution-flow.

@ahrtr
Copy link
Member

ahrtr commented Mar 28, 2023

The test case --- FAIL: TestAuthMemberRemove (10.27s) failed in linux-386-e2e, can you take a look? thx

@chaochn47 chaochn47 force-pushed the fix_flaking_auth_member_remove_test branch from 1e802fd to 257a05a Compare March 29, 2023 00:12
@chaochn47
Copy link
Member Author

The test case --- FAIL: TestAuthMemberRemove (10.27s) failed in [test (linux-386-e2e)](https://github.com/etcd-io/etcd/actions/runs/4546148874/jobs/8014421238?pr=15580), can you take a look? thx

Yeah, I found the reason. Updated in the PR.

@chaochn47 chaochn47 force-pushed the fix_flaking_auth_member_remove_test branch from 257a05a to bd911e6 Compare March 29, 2023 00:52
@chaochn47 chaochn47 force-pushed the fix_flaking_auth_member_remove_test branch 2 times, most recently from f7985c1 to d7443cb Compare April 4, 2023 00:35
@chaochn47
Copy link
Member Author

Hi @serathius @ahrtr, thanks for the review!!

I have updated the PR based on the feedback. PTAL to fix the flaky test, thanks!

Signed-off-by: Chao Chen <chaochn@amazon.com>
@chaochn47 chaochn47 force-pushed the fix_flaking_auth_member_remove_test branch from d7443cb to caed563 Compare April 4, 2023 00:41
@chaochn47
Copy link
Member Author

chaochn47 commented Apr 4, 2023

=== FAIL: common TestMemberList/PeerTLS (5.56s)
    logger.go:130: 2023-04-04T00:50:49.099Z	WARN	m2	failed to publish local member to cluster through raft	{"member": "m2", "local-member-id": "d15ce587df9239cd", "local-member-attributes": "{Name:m2 ClientURLs:[unix://127.0.0.1:2154307156]}", "publish-timeout": "5.2s", "error": "etcdserver: request timed out, possibly due to connection lost"}
    logger.go:130: 2023-04-04T00:50:49.102Z	INFO	m2	published local member to cluster through raft	{"member": "m2", "local-member-id": "d15ce587df9239cd", "local-member-attributes": "{Name:m2 ClientURLs:[unix://127.0.0.1:2154307156]}", "cluster-id": "d3e7f0d6682b9a82", "publish-timeout": "5.2s"}
    member_test.go:56: member is not started, memberId:15086185223518566861, memberName:m2
    member_test.go:56: member is not started, memberId:15086185223518566861, memberName:m2
    member_test.go:53: 
        	Error Trace:	/home/runner/work/etcd/etcd/tests/common/member_test.go:53
        	            				/home/runner/work/etcd/etcd/tests/framework/testutils/execute.go:38
        	            				/opt/hostedtoolcache/go/1.19.7/x64/src/runtime/asm_amd64.s:1594
        	Error:      	Condition never satisfied
        	Test:       	TestMemberList/PeerTLS

https://github.com/etcd-io/etcd/actions/runs/4602707841/jobs/8131973021?pr=15580

Test failed right after the successful cluster URL and member name publish... I will raise another PR to fix it. Could you please click the test re-run? Thanks!

Copy link
Member

@ahrtr ahrtr left a comment

Choose a reason for hiding this comment

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

LGTM

Thanks @chaochn47

memberIDToEndpoints = make(map[uint64]string, len(clus.Endpoints()))
for _, ep := range clus.Endpoints() {
cc := testutils.MustClient(clus.Client(WithEndpoints([]string{ep})))
gresp, err := cc.Get(ctx, "health", config.GetOptions{})
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 this can be done with one Status request instead of 3 Get request.

Still, it's not a big issue.

Copy link
Member

Choose a reason for hiding this comment

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

Please consider a followup

Copy link
Member Author

@chaochn47 chaochn47 Apr 4, 2023

Choose a reason for hiding this comment

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

aha, thanks for the suggestion! Yeah, it definitely worth a quick follow up. I will pick it up tomorrow.

@serathius serathius merged commit 8b6bf90 into etcd-io:main Apr 4, 2023
@chaochn47 chaochn47 deleted the fix_flaking_auth_member_remove_test branch April 4, 2023 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants