-
Notifications
You must be signed in to change notification settings - Fork 370
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
Do not attempt to join Windows agents to memberlist cluster #5434
Conversation
Windows Nodes should not join the memberlist cluster as all features relying on it is not only supported on Windows. Currently an agent only runs the memberlist module and listen to the memberlist port when required so attempts to join Windows agents are destined to fail, leading to misleading error logs. This commit fixes it by ignoring Windows Nodes when joining agents. Signed-off-by: Quan Tian <[email protected]>
/test-all |
func (c *Cluster) handleCreateNode(obj interface{}) { | ||
node := obj.(*corev1.Node) | ||
if !shouldJoinCluster(node) { |
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.
not worth it to have a filtered node informer based on the label, and avoid the calls to shouldJoinCluster
? (or maybe not possible?)
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.
It's possible but may be not worth as other modules need all Nodes so an unfiltered node informer is required anyway. If we create a filtered node informer, it will create another connection to kube-apiserver and store a copy of linux nodes:
// NewFilteredNodeInformer constructs a new informer for Node type.
// Always prefer using an informer factory to get a shared informer instead of getting an independent
// one. This reduces memory footprint and number of connections to the server.
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.
Makes sense
Windows Nodes should not join the memberlist cluster as all features relying on it is not only supported on Windows. Currently an agent only runs the memberlist module and listen to the memberlist port when required so attempts to join Windows agents are destined to fail, leading to misleading error logs.
This commit fixes it by ignoring Windows Nodes when joining agents.
Fixes #5431
Confirmed the error logs are gone in a mixed OS testbed.