headscale/.github
Kristoffer Dalby 7e62031444
replace ephemeral deletion logic (#2008)
* replace ephemeral deletion logic

this commit replaces the way we remove ephemeral nodes,
currently they are deleted in a loop and we look at last seen
time. This time is now only set when a node disconnects and
there was a bug (#2006) where nodes that had never disconnected
was deleted since they did not have a last seen.

The new logic will start an expiry timer when the node disconnects
and delete the node from the database when the timer is up.

If the node reconnects within the expiry, the timer is cancelled.

Fixes #2006

Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>

* use uint64 as authekyid and ptr helper in tests

Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>

* add test db helper

Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>

* add list ephemeral node func

Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>

* schedule ephemeral nodes for removal on startup

Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>

* fix gorm query for postgres

Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>

* add godoc

Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>

---------

Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
2024-07-18 10:01:59 +02:00
..
ISSUE_TEMPLATE replace issue templates with github issue forms 2024-04-22 23:10:34 +02:00
workflows replace ephemeral deletion logic (#2008) 2024-07-18 10:01:59 +02:00
CODEOWNERS CODEOWNER: add renovate config ohdearaugustin 2022-02-19 20:28:08 +01:00
FUNDING.yml Add ko-fi sponsor button 2022-12-22 17:25:49 +01:00
pull_request_template.md Add contributing document 2024-04-29 23:04:02 +02:00
renovate.json update readme and templates to clarify scope (#1437) 2023-05-10 08:03:13 +01:00