Skip to content
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

ipn/ipnlocal: move handling of expired nodes to LocalBackend #6937

Merged
merged 1 commit into from Jan 14, 2023

Conversation

andrew-d
Copy link
Member

In order to be able to synthesize a new NetMap when a node expires, have LocalBackend start a timer when receiving a new NetMap that fires slightly after the next node expires. Additionally, move the logic that updates expired nodes into LocalBackend so it runs on every netmap (whether received from controlclient or self-triggered).

Updates #6932

Signed-off-by: Andrew Dunham andrew@du.nham.ca
Change-Id: I833390e16ad188983eac29eb34cc7574f555f2f3

@andrew-d andrew-d force-pushed the andrew/expired-nodes-localbackend branch from eed537b to 2def59d Compare January 11, 2023 21:04
ipn/ipnlocal/expiry.go Show resolved Hide resolved
// Copyright (c) 2023 Tailscale Inc & AUTHORS All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe a little file comment up here? (not attached to copyright or package line)

ipn/ipnlocal/local.go Outdated Show resolved Hide resolved
ipn/ipnlocal/local.go Outdated Show resolved Hide resolved
ipn/ipnlocal/local.go Outdated Show resolved Hide resolved
@andrew-d andrew-d force-pushed the andrew/expired-nodes-localbackend branch from 2def59d to 3b65f7c Compare January 13, 2023 19:47
ipn/ipnlocal/local.go Outdated Show resolved Hide resolved
@andrew-d andrew-d force-pushed the andrew/expired-nodes-localbackend branch from 3b65f7c to 7394128 Compare January 13, 2023 21:55
In order to be able to synthesize a new NetMap when a node expires, have
LocalBackend start a timer when receiving a new NetMap that fires
slightly after the next node expires. Additionally, move the logic that
updates expired nodes into LocalBackend so it runs on every netmap
(whether received from controlclient or self-triggered).

Updates #6932

Signed-off-by: Andrew Dunham <andrew@du.nham.ca>
Change-Id: I833390e16ad188983eac29eb34cc7574f555f2f3
@andrew-d andrew-d force-pushed the andrew/expired-nodes-localbackend branch from 7394128 to 431b06a Compare January 14, 2023 21:25
@bradfitz
Copy link
Member

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants