-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Codereorg: Part 5, state #1492
Codereorg: Part 5, state #1492
Commits on Sep 11, 2023
-
Signed-off-by: Kristoffer Dalby <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for a885e1f - Browse repository at this point
Copy the full SHA a885e1fView commit details -
Replace the timestamp based state system
This commit replaces the timestamp based state system with a new one that has update channels directly to the connected nodes. It will send an update to all listening clients via the polling mechanism. It introduces a new package notifier, which has a concurrency safe manager for all our channels to the connected nodes. Signed-off-by: Kristoffer Dalby <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 2f7cbc8 - Browse repository at this point
Copy the full SHA 2f7cbc8View commit details -
This commits extends the mapper with functions for creating "delta" MapResponses for different purposes (peer changed, peer removed, derp). This wires up the new state management with a new StateUpdate struct letting the poll worker know what kind of update to send to the connected nodes. Signed-off-by: Kristoffer Dalby <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 47a75db - Browse repository at this point
Copy the full SHA 47a75dbView commit details -
Add missing return in shutdown
Co-Authored-By: Jason <[email protected]> Signed-off-by: Kristoffer Dalby <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for a52db30 - Browse repository at this point
Copy the full SHA a52db30View commit details -
add script to run integration tests
Signed-off-by: Kristoffer Dalby <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 8e973f4 - Browse repository at this point
Copy the full SHA 8e973f4View commit details -
rearrange channel closing defers
Signed-off-by: Kristoffer Dalby <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for b6593dc - Browse repository at this point
Copy the full SHA b6593dcView commit details -
add annoying linter to golangci
Signed-off-by: Kristoffer Dalby <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 3b8c4c9 - Browse repository at this point
Copy the full SHA 3b8c4c9View commit details -
add less/jq to hs debug container
Signed-off-by: Kristoffer Dalby <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 809db0c - Browse repository at this point
Copy the full SHA 809db0cView commit details -
add debug option to save all map responses
Signed-off-by: Kristoffer Dalby <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 1013e5f - Browse repository at this point
Copy the full SHA 1013e5fView commit details -
disable online map by default for now
Signed-off-by: Kristoffer Dalby <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 3ee0179 - Browse repository at this point
Copy the full SHA 3ee0179View commit details -
introduce rw lock for db, ish...
Signed-off-by: Kristoffer Dalby <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 3bfc123 - Browse repository at this point
Copy the full SHA 3bfc123View commit details -
additional debug logging, use mapper pointer
Signed-off-by: Kristoffer Dalby <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for c054fb5 - Browse repository at this point
Copy the full SHA c054fb5View commit details -
only send lite map responses when omitpeers
Signed-off-by: Kristoffer Dalby <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 52a85bc - Browse repository at this point
Copy the full SHA 52a85bcView commit details -
Configuration menu - View commit details
-
Copy full SHA for eb1a556 - Browse repository at this point
Copy the full SHA eb1a556View commit details -
add maprequest to all mapper calls
Signed-off-by: Kristoffer Dalby <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for d84ea0e - Browse repository at this point
Copy the full SHA d84ea0eView commit details -
remove retries for pings in tsic
Signed-off-by: Kristoffer Dalby <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 6b620ca - Browse repository at this point
Copy the full SHA 6b620caView commit details -
filter out peers without endpoints
Signed-off-by: Kristoffer Dalby <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 6b49dad - Browse repository at this point
Copy the full SHA 6b49dadView commit details -
Signed-off-by: Kristoffer Dalby <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 841e3c5 - Browse repository at this point
Copy the full SHA 841e3c5View commit details -
Update packetfilter when peers change
Previously we did not update the packet filter when nodes changed, which would cause new nodes to be missing from packet filters of old nodes. Signed-off-by: Kristoffer Dalby <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 7c2c9b0 - Browse repository at this point
Copy the full SHA 7c2c9b0View commit details -
This commit changes the internals of the mapper to track all the changes to peers over its lifetime. This means that it no longer depends on the database and this should hopefully help with locks and timing issues. When the mapper is created, it needs the current list of peers, the world view, when the polling session was started. Then as update changes are called, it tracks the changes and generates responses based on its internal list. As a side, the types.Machines and types.MachinesP, as well as types.Machine being passed as a full struct and pointer has been changed to always be pointers, everywhere. Signed-off-by: Kristoffer Dalby <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 1e74117 - Browse repository at this point
Copy the full SHA 1e74117View commit details -
move MapResponse peer logic into function and reuse
Signed-off-by: Kristoffer Dalby <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for fdaf9da - Browse repository at this point
Copy the full SHA fdaf9daView commit details -
give ci more tollerance for timeouts
Signed-off-by: Kristoffer Dalby <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for db5864d - Browse repository at this point
Copy the full SHA db5864dView commit details -
Upgrade go and debian in headscale docker
Signed-off-by: Kristoffer Dalby <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for df1f4b3 - Browse repository at this point
Copy the full SHA df1f4b3View commit details -
add lock around saving ts clients
Closes juanfont#1544 Co-Authored-By: Patrick Huang <[email protected]> Signed-off-by: Kristoffer Dalby <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for b6d64e1 - Browse repository at this point
Copy the full SHA b6d64e1View commit details -
Signed-off-by: Kristoffer Dalby <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 8882825 - Browse repository at this point
Copy the full SHA 8882825View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4b4b032 - Browse repository at this point
Copy the full SHA 4b4b032View commit details -
Signed-off-by: Kristoffer Dalby <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for db8761f - Browse repository at this point
Copy the full SHA db8761fView commit details -
Remove LastSuccessfulUpdate from Machine
This field is no longer used, it was used in our old state "algorithm" to determine if we should send an update. Signed-off-by: Kristoffer Dalby <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for ec39145 - Browse repository at this point
Copy the full SHA ec39145View commit details -
improve debug logging, rw lock for notifier
Signed-off-by: Kristoffer Dalby <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for decbeb7 - Browse repository at this point
Copy the full SHA decbeb7View commit details -
Return simple responses immediatly
This commit rearranges the poll handler to immediatly accept updates and notify its peers and return, not travel down the function for a bit. This reduces the DB calls and other holdups that isnt necessary to send a "lite response", a map response without peers, or accepting an endpoint update. Signed-off-by: Kristoffer Dalby <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 1f4d51d - Browse repository at this point
Copy the full SHA 1f4d51dView commit details -
handle route updates correctly
Signed-off-by: Kristoffer Dalby <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for bc9fc67 - Browse repository at this point
Copy the full SHA bc9fc67View commit details