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:
Ian Gulliver
2026-01-31 10:03:38 -08:00
parent bb22e16460
commit 280e786b73
3 changed files with 27 additions and 1 deletions

View File

@@ -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
}