Commit Graph

5 Commits (c386bc9e9cca9563e7e63f159c506fc7dc098d96)

Author SHA1 Message Date
Simon Law c386bc9e9c
ipn/ipnlocal: determine client-side-reachability by pinging
PR #17367 introduced the `client-side-reachability` node attribute
that switches the node to completely ignore the online signal from
control. This was to work around the times when the control plane
determines that a node is not online, while the node is still able to
connect to its peers. However, this breaks high-availability failover,
since nodes that are actually offline are never treated that way.

This PR makes nodeBackend.PeerIsReachable actually test reachability
by disco-pinging the peer node.

In the future, the client itself should collect reachability data from
active Wireguard flows.

Updates #17366
Updates tailscale/corp#30379
Updates tailscale/corp#32686
Updates tailscale/corp#33033

Signed-off-by: Simon Law <sfllaw@tailscale.com>
2 months ago
Simon Law cd523eae52
ipn/ipnlocal: introduce the concept of client-side-reachability (#17367)
The control plane will sometimes determine that a node is not online,
while the node is still able to connect to its peers. This patch
doesn’t solve this problem, but it does mitigate it.

This PR introduces the `client-side-reachability` node attribute that
switches the node to completely ignore the online signal from control.

In the future, the client itself should collect reachability data from
active Wireguard flows and Tailscale pings.

Updates #17366
Updates tailscale/corp#30379
Updates tailscale/corp#32686

Signed-off-by: Simon Law <sfllaw@tailscale.com>
2 months ago
Nick Khyl 9781b7c25c ipn/ipnlocal: plumb logf into nodeBackend
Updates #cleanup

Signed-off-by: Nick Khyl <nickk@tailscale.com>
2 months ago
Jordan Whited 8e6f63cf11
ipn/ipnlocal,wgengine/magicsock: use eventbus for node & filter updates (#16271)
nodeBackend now publishes filter and node changes to eventbus topics
that are consumed by magicsock.Conn

Updates tailscale/corp#27502
Updates tailscale/corp#29543

Signed-off-by: Jordan Whited <jordan@tailscale.com>
6 months ago
Nick Khyl 733bfaeffe ipn/ipnlocal: signal nodeBackend readiness and shutdown
We update LocalBackend to shut down the current nodeBackend
when switching to a different node, and to mark the new node's
nodeBackend as ready when the switch completes.

Updates tailscale/corp#28014
Updates tailscale/corp#29543
Updates #12614

Signed-off-by: Nick Khyl <nickk@tailscale.com>
6 months ago