-
Notifications
You must be signed in to change notification settings - Fork 812
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
Add memberlist TLS configuration options #4046
Conversation
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. Small nit about error formatting
if config.TLSEnabled { | ||
tcpLn, err = tls.Listen("tcp", tcpAddr.String(), t.tlsConfig) | ||
if err != nil { | ||
return nil, fmt.Errorf("failed to start tls TCP listener on %q port %d: %v", addr, port, err) |
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.
Should these be %w
for the error?
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.
Yea, I think this would be a good fit for that formatting directive.
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.
I agree on %w
but, doing a step forward, what if we move to errors.Wrapf()
like we're currently doing everywhere? This looks material for a follow up PR, not to be done in this one.
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.
%w/%v
makes no difference, until we want to unwrap the errors and work with them. If we just log them, it doesn't matter. (Agree on using errors.Wrap
, when we get to fixing this)
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 (after addressing the comments)
cortex1 = newSingleBinary("cortex-1", networkName+"-cortex-1", "") | ||
cortex2 = newSingleBinary("cortex-2", networkName+"-cortex-2", networkName+"-cortex-1:8000") | ||
cortex3 = newSingleBinary("cortex-3", networkName+"-cortex-3", networkName+"-cortex-1:8000") |
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.
This maybe a bit misleading. The TLSServerName should be set to a name required on the certificate of the peer (you are setting the name to ourselves).
So in the case of cortex1
(line 66), I would expect it to be set to cortex-2 and cortex-3.
Probably the best is only have a single DNS name on the certificate as otherwise we would need to set it independently depending on which peer we are connecting to.
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 (modulo a couple of nits). Thanks!
if config.TLSEnabled { | ||
tcpLn, err = tls.Listen("tcp", tcpAddr.String(), t.tlsConfig) | ||
if err != nil { | ||
return nil, fmt.Errorf("failed to start tls TCP listener on %q port %d: %v", addr, port, err) |
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.
I agree on %w
but, doing a step forward, what if we move to errors.Wrapf()
like we're currently doing everywhere? This looks material for a follow up PR, not to be done in this one.
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 Jacob for taking my feedback in consideration. Let's rebuild the generated config and should be good to go!
Signed-off-by: Jacob Lisi <[email protected]>
Signed-off-by: Jacob Lisi <[email protected]>
Signed-off-by: Jacob Lisi <[email protected]>
Signed-off-by: Jacob Lisi <[email protected]>
Signed-off-by: Jacob Lisi <[email protected]>
Signed-off-by: Jacob Lisi <[email protected]>
Signed-off-by: Jacob Lisi <[email protected]>
Signed-off-by: Jacob Lisi <[email protected]>
511594f
to
cdf53d4
Compare
What this PR does:
Which issue(s) this PR fixes:
Fixes #4045
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]