Mark config-only nodes as unreachable when they have no IPs
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
9
ping.go
9
ping.go
@@ -158,6 +158,15 @@ func (t *Tendrils) pingNode(node *Node) {
|
||||
t.nodes.mu.RUnlock()
|
||||
|
||||
if len(ips) == 0 {
|
||||
t.ping.mu.Lock()
|
||||
t.ping.failures[nodeID]++
|
||||
failures := t.ping.failures[nodeID]
|
||||
t.ping.mu.Unlock()
|
||||
if failures >= pingFailureThreshold {
|
||||
if node.SetUnreachable(true) {
|
||||
log.Printf("[ping] %s is unreachable (no ip addresses)", nodeName)
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user