-
Notifications
You must be signed in to change notification settings - Fork 920
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
Use hashicorp/memberlist to speedup dead node detection #527
Conversation
Great idea! I really think using Kubernetes to do the failover handling is not a practical approach. Do you have any indication how this will scale with e.g. 50 or 80 nodes? |
According to this presentation https://www.hashicorp.com/resources/everybody-talks-gossip-serf-memberlist-raft-swim-hashicorp-consul, hashicorp goal is/was 5k nodes, so even if we don't tune memberlist configuration properly with 100 nodes I think we should be fine. |
@danderson when you have time to review, I don't mind some guidance how you would see this code ;) |
TL;DR: I love it. But I'm trying to onboard more maintainers aside from me, and @daxmc99 wanted to do the review on this, so I'm going to let them do the first pass. Thank you for making this! |
@daxmc99 I've improved the PR a bit, I just need need to fix MemberList logs to use MetalLB logger, but please review when you can |
1445f9f
to
bdfb01d
Compare
I've fixed the logs, here an example:
|
Ok I think this is ready |
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.
A quite high-level review:
This looks great and the code makes sense. I'm still getting my bearings on metallb so I would like to wait till Saturday to give this the proper test drive it needs.
@daxmc99 no problem, I just realised I haven't fixed the tests, I'll try to so that before this weekend |
I haven't improved/added tests but I've fixed it |
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.
This is really great! I also noticed a reduced dead node detection time in my testing!
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.
@champtar I tried this change in my env, and I am running into:
standard_init_linux.go:211: exec user process caused "permission denied"
from the controller container.
@mskrocki I've not even run tested the new controller in my testing as almost nothing changes |
I just created controller from HEAD and I am running into same issue, so it is my env. Sorry for the confusion. |
@mskrocki no problem. Do look if you built a fully static go binary or not as I remember having similar issue (you compile and link on a glibc system, then copy in a musl container) |
@danderson: @daxmc99 approved so tell me if you want some changes |
The only thing I would like to change (not necessarily in this PR), is the static encryption key in the manifest. I have two problems with this:
In general, I think a good way to do this would be:
That way, the security aspect of memberlist would Just Work, with no configuration required. But that said, this is a huge improvement to failover time, and I don't want to block releasing it on these changes. So instead, can you tweak the installation docs (in the website subdir) to mention that operators should change the manifest secret key before deploying? |
@danderson I 100% agree on the just work part, I wanted to put the guid of the speaker DaemonSet via the downward API but it's not supported. |
Just need to update the kustomize part now |
f37ae7d
to
6f8d27e
Compare
Haven't tested kustomize part, can someone tell me if that seems ok ? |
Signed-off-by: Etienne Champetier <echampetier@anevia.com>
… log Signed-off-by: Etienne Champetier <echampetier@anevia.com>
76519ed
to
7e5c9e7
Compare
By default MemberList is disabled, so new behaviour is opt-in on upgrade This fixes metallb#298 Signed-off-by: Etienne Champetier <echampetier@anevia.com>
This worked
@danderson I think this should be good now |
@danderson friendly ping :) |
@danderson @daxmc99 pretty please :) |
Merged, thank you! If @daxmc99 has other feedback, we can do it in a followup change. We've been talking about scheduling a release in #metallb-dev on the k8s slack, if you want to drop in there. |
In metallb#527, HashiCorp memberlist support was added, which requires a secret to be present in the metallb-system namespace. We need to create this secret in the dev environment for speakers to converge.
In metallb#527, HashiCorp memberlist support was added, which requires a secret to be present in the metallb-system namespace. We need to create this secret in the dev environment for speakers to converge.
In metallb#527, HashiCorp memberlist support was added, which requires a secret to be present in the metallb-system namespace. We need to create this secret in the dev environment for speakers to converge.
In metallb#527, HashiCorp memberlist support was added, which requires a secret to be present in the metallb-system namespace. We need to create this secret in the dev environment for speakers to converge.
In metallb#527, HashiCorp memberlist support was added, which requires a secret to be present in the metallb-system namespace. We need to create this secret in the dev environment for speakers to converge.
In #527, HashiCorp memberlist support was added, which requires a secret to be present in the metallb-system namespace. We need to create this secret in the dev environment for speakers to converge.
This is an early POC to fix #298.
It needs a lot of cleanup, but without tuning I get failover around 3s \o/