- Notifications
You must be signed in to change notification settings - Fork928
fix: set node callback each time we reinit the coordinator in servertailnet#12140
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
Uh oh!
There was an error while loading.Please reload this page.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
This stack of pull requests is managed by Graphite.Learn more about stacking. Join@spikecurtis and the rest of your teammates on |
coadler approved these changesFeb 14, 2024
deansheather approved these changesFeb 14, 2024
mafredri approved these changesFeb 14, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
LGTM!
I wonder if the test failure is related, though?
t.go:108: 2024-02-14 16:34:18.608 [erro] pgcoord: failed to write binding to database coordinator_id=d6a85ffb-78b2-4c20-b37a-201b43f7d658 binding_id="[74 174 236 19 74 52 64 134 184 243 51 11 140 133 243 253]" node="id:2386665641149345937 as_of:{seconds:1707928458 nanos:568114000} key:\"np\\x8a\\xe4\\x1a\\xebv\\xcc=\\x07\\xe6M\\xf5\\x05\\x84\\x8c\\n\\x99\\x91\\xfb\\xd2ҳ\\x1eY\\x1a\\xeeg\\xce\\x19q\\xf5+B\" disco:\"discokey:d9c88cb39f04aa14298f300bd8871b1b9916256d3a86b91a73652e1e5229fb13\" preferred_derp:999 derp_latency:{key:\"999-v4\" value:0.00029301} addresses:\"fd7a:115c:a1e0:4594:bb1c:bb6b:af5c:27e7/128\" allowed_ips:\"fd7a:115c:a1e0:4594:bb1c:bb6b:af5c:27e7/128\" endpoints:\"127.0.0.1:53738\" endpoints:\"172.17.0.1:53738\" endpoints:\"192.168.100.229:53738\"" error="pq: insert or update on table \"tailnet_peers\" violates foreign key constraint \"tailnet_peers_coordinator_id_fkey\""
Merge activity
|
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading.Please reload this page.
I think this willresolve#12136 but lets get a proper test at the system level before closing.
Before this change, we only register the node callback at start of day for the server tailnet. If the coordinator changes, like we know happens when we are licensed for the PGCoordinator, we close the connection to the old coord, and open a new one to the new coord.
The callback is designed to direct the updates to the new coordinator, but there is nothing that specifically triggers it to fire after we connect to the new coordinator.
If we have STUN, then period re-STUNs will generally get it to fire eventually, but without STUN it we could go indefinitely without a callback.
This PR changes the servertailnet to re-register the callback each time we reconnect to the coordinator. Registering a callback (even if it's the same callback) triggers an immediate call with our node information, so the new coordinator will have it.