Skip to content

Commit ae0f376

Browse files
committed
backport of commit 16fb6d5
1 parent ac1c01d commit ae0f376

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

client/client.go

+2-5
Original file line numberDiff line numberDiff line change
@@ -2046,11 +2046,8 @@ func (c *Client) updateNodeStatus() error {
20462046
return fmt.Errorf("heartbeat response returned no valid servers")
20472047
}
20482048

2049-
// Begin polling Consul if there is no Nomad leader. We could be
2050-
// heartbeating to a Nomad server that is in the minority of a
2051-
// partition of the Nomad server quorum, but this Nomad Agent still
2052-
// has connectivity to the existing majority of Nomad Servers, but
2053-
// only if it queries Consul.
2049+
// If there's no Leader in the response we may be talking to a partitioned
2050+
// server. Redo discovery to ensure our server list is up to date.
20542051
if resp.LeaderRPCAddr == "" {
20552052
c.triggerDiscovery()
20562053
}

0 commit comments

Comments
 (0)