-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Fix peering establishment bugs on followers #14119
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
Conversation
@@ -816,6 +816,7 @@ func newGRPCHandlerFromConfig(deps Deps, config *Config, s *Server) connHandler | |||
|
|||
// Note: these external gRPC services are also exposed on the internal server to | |||
// enable RPC forwarding. | |||
s.peerStreamServer.Register(srv) |
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.
Can you add a test to ensure that forwarding is working? Here's an example:
https://github.com/hashicorp/consul-enterprise/blob/main/agent/consul/partition_backend_test.go#L84
If you comment out this change the unknown service
error should come up
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.
Added in 5078d6e
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.
Confirmed unknown service
comes up without this change
@@ -1332,3 +1333,13 @@ func TestLeader_Peering_retryLoopBackoffPeering_cancelContext(t *testing.T) { | |||
fmt.Errorf("error 1"), | |||
}, allErrors) | |||
} | |||
|
|||
func Test_isFailedPreconditionErr(t *testing.T) { |
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.
❤️
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.
Thanks for the quick fix!
Description
isFailedPreconditionErr
did not properly handle wrapped status errorsrpc error: code = Unimplemented desc = unknown service hashicorp.consul.internal.peerstream.PeerStreamService
Testing & Reproduction steps
PR Checklist