-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Fix RPC tunneling when running both client/server #4317
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -31,6 +31,9 @@ func (s *Server) getNodeConn(nodeID string) (*nodeConnState, bool) { | |||||
s.nodeConnsLock.RLock() | ||||||
defer s.nodeConnsLock.RUnlock() | ||||||
conns, ok := s.nodeConns[nodeID] | ||||||
if !ok { | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Might be worthwhile to add a test explicitly for this error case There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nomad/nomad/client_rpc_test.go Lines 81 to 82 in 9e761d4
This just reduces nosy logs. |
||||||
return nil, false | ||||||
} | ||||||
|
||||||
// Return the latest conn | ||||||
var state *nodeConnState | ||||||
|
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.
Why was setting the RPCHandler removed? What replaces this functionality?
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.
If you read my description you will see why this is problematic. By using in memory only RPCs the mechanism to track client connections doesn't work and thus proxied connections break. Therefore we switch to using the normal mechanism of RPCs and just explicitly seed the client's server list with the address the server is bound to.