-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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 the TestLeader_SecondaryCA_IntermediateRefresh test flakine… #6885
Conversation
Codecov Report
@@ Coverage Diff @@
## master #6885 +/- ##
==========================================
+ Coverage 65.83% 65.85% +0.01%
==========================================
Files 435 435
Lines 52488 52488
==========================================
+ Hits 34558 34564 +6
+ Misses 13796 13788 -8
- Partials 4134 4136 +2
Continue to review full report at Codecov.
|
I think I know what the problem is. The flow goes something like this:
The fixes in this PR work because we wait to get the "new" intermediate until after waiting for the roots to be updated in both the primary and secondary CAs. While I think it would be good to get this fix in (just so we can make CI happy and because that is how to make the test more robust), it did turn up a minor issue with the roots watcher which I have opened an issue for: #6886 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reasonable quick fix, the issue(s) still need to be fixed but this helps CI some until they are and isn't "wrong".
Hey there, This issue has been automatically locked because it is closed and there hasn't been any activity for at least 30 days. If you are still experiencing problems, or still have questions, feel free to open a new one 👍. |
Before the fix:
go test -count 10 ./agent/consul -run TestLeader_SecondaryCA_IntermediateRefresh
would fail 9/10 times. After the fix, I ran it with-count 100
and it passed every time.The real question here is whether needing to move these up is indicative of an actual issue.
cc: @banks
What I believe was happening was that the intermediate was being changed between when we got the updated intermediate from the secondary CA provider and when we actually signed the cert. Therefore, the leaf cert couldn't be verified because we were setting up the cert pool with the old intermediate.
I added some debug logging to the Consul CA provider so I could see when it was setting new intermediates and it did happen 3 times.
https://gist.github.com/mkeeler/c4a8a7f429f788641d1562a63bbe7251