Fix TLS verify error when gh-ost discovers the replication master#1487
Merged
meiji163 merged 7 commits intogithub:masterfrom Feb 24, 2025
Merged
Fix TLS verify error when gh-ost discovers the replication master#1487meiji163 merged 7 commits intogithub:masterfrom
meiji163 merged 7 commits intogithub:masterfrom
Conversation
…Name property Ensure the ServerName TLS property matches the new connection instance key hostname to avoid TLS verify errors like the following: 2025-01-02 02:07:26 FATAL tls: failed to verify certificate: x509: certificate is valid for [old host], not [new host] This is only one part of the fix for this issue. The second part, registering TLS Config with the mysql driver, will come in subsequent commits.
… driver This allows us to register TLS configuration is the various places where connection configs are created and before they're used.
This ensures that the master's TLS config has been registered with the mysql driver before any connections are attempted. This is the second part of resolving the following TLS verify error: 2025-01-02 02:07:26 FATAL tls: failed to verify certificate: x509: certificate is valid for [old host], not [new host]
This ensures that the throttler's TLS config has been registered with the mysql driver before any connections are attempted. This is the second part of resolving the following TLS verify error: 2025-01-02 02:07:26 FATAL tls: failed to verify certificate: x509: certificate is valid for [old host], not [new host]
Contributor
|
This LGTM, thanks for the fix! |
meiji163
approved these changes
Feb 24, 2025
Contributor
Author
|
Thank you! When could we expect the changes be released in a new version? (no urgency, just asking for internal planning) |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
A Pull Request should be associated with an Issue.
Related issue: #1259
Description
This PR resolves TLS certificate verification failures when gh-ost discovers, or is forced to used, different master server hosts to what's specified by the
--hostarg.Example error:
There are three reasons that, when combined, cause this error:
DuplicateCredentialsfunction doesn't update the TLS config'sServerNameproperty to match the connection's updated Key/Hostname.ghost.script/cibuildreturns with no formatting errors, build errors or unit test errors.Considerations