headscale/hscontrol/state
Kristoffer Dalby 96d2e6ed60 state: roll back node store when re-registration write fails
Re-registration mutated the node store before the database write and did not
revert on failure, so a restart could drop the client's current node key.
Snapshot the node and restore it if the write fails.

Updates #3312
2026-06-15 20:29:15 +02:00
..
auth_cache_test.go
auth_tagged_expiry_test.go state: update node in place on pre-auth-key re-registration 2026-06-15 20:29:15 +02:00
autoapprove_test.go state: batch route auto-approval into one policy rebuild 2026-06-08 10:04:49 +02:00
connect_test.go state, poll: refcount poll sessions, mark offline only on last release 2026-06-11 16:28:25 +02:00
debug.go all: apply godoc [Name] link conventions across comments 2026-05-19 09:55:22 +02:00
debug_test.go
endpoint_test.go state: patch relogins and gate endpoint broadcasts 2026-06-15 12:02:39 +02:00
ephemeral_test.go
ha_health.go all: apply godoc [Name] link conventions across comments 2026-05-19 09:55:22 +02:00
maprequest.go all: apply godoc [Name] link conventions across comments 2026-05-19 09:55:22 +02:00
maprequest_noop_test.go state: skip database persist for keepalive-only map requests 2026-06-08 10:04:49 +02:00
maprequest_test.go all: apply godoc [Name] link conventions across comments 2026-05-19 09:55:22 +02:00
node_store.go state: make any-user machine-key lookup deterministic 2026-06-15 20:29:15 +02:00
node_store_hostname_test.go
node_store_stop_test.go state: signal NodeStore shutdown without closing writeQueue 2026-06-08 10:04:49 +02:00
node_store_test.go state: make any-user machine-key lookup deterministic 2026-06-15 20:29:15 +02:00
persist_clobber_test.go state: persist live NodeStore node in persistNodeToDB 2026-06-08 10:04:49 +02:00
persist_test.go state: roll back node store when re-registration write fails 2026-06-15 20:29:15 +02:00
ping.go all: apply godoc [Name] link conventions across comments 2026-05-19 09:55:22 +02:00
ping_test.go
primaries_property_test.go state, servertest: property-test HA election + invariant catalogue 2026-05-18 17:18:08 +02:00
primaries_test.go state, servertest: property-test HA election + invariant catalogue 2026-05-18 17:18:08 +02:00
ssh_check_test.go
state.go state: roll back node store when re-registration write fails 2026-06-15 20:29:15 +02:00
tags.go all: apply godoc [Name] link conventions across comments 2026-05-19 09:55:22 +02:00
test_helpers.go all: apply godoc [Name] link conventions across comments 2026-05-19 09:55:22 +02:00