-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
*: support reload tls used by mysql protocol in place (#14749) #15080
Conversation
Signed-off-by: sre-bot <sre-bot@pingcap.com>
/run-all-tests |
/run-all-tests |
|
||
tlsConfig, err := util.LoadTLSCertificates(s.cfg.Security.SSLCA, s.cfg.Security.SSLKey, s.cfg.Security.SSLCert) | ||
if err != nil { | ||
logutil.Logger(context.Background()).Error("secure connection cert/key/ca load fail", zap.Error(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.
differ to master, it doesn't return error to compatible with old 3.0
/run-all-tests |
@jackysp @tiancaiamao conflict has be resolved and keep compatible with old 3.0 keep work if tls config is wrong, PTAL if free |
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
LGTM |
/merge |
Your auto merge job has been accepted, waiting for 15092 |
/run-all-tests |
@sre-bot merge failed. |
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
/merge |
Sorry @imtbkcat, you don't have permission to trigger auto merge event on this branch. |
/merge |
Sorry @lysu, you don't have permission to trigger auto merge event on this branch. |
/rebuild |
/merge |
/run-all-tests |
cherry-pick #14749 to release-3.0
What problem does this PR solve?
ref #14666
preliminary support reload tls used by mysql protocol
this PR doesn't try to full support mysql's dynamic modify "ssl_ca/ssl_key/ssl_cert" value, but can reload tls used old file path specified by old "ssl_ca/ssl_key/ssl_cert" value(so ssl_cert/ssl_ca/ssl_key keep read-only after this PR).
so user can:
alter instance reload tls
then all new db connection will use new cert file, old connection will keep work just like mysql does
What is changed and how it works?
LoadTLSCertificates
server.tlsConfig
can be atomic swapCheck List
Tests
Code changes
Side effects
Related changes
Release note
This change is![Reviewable](https://camo.githubusercontent.com/1541c4039185914e83657d3683ec25920c672c6c5c7ab4240ee7bff601adec0b/68747470733a2f2f72657669657761626c652e696f2f7265766965775f627574746f6e2e737667)