You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix TLS verify error when gh-ost discovers the replication master (#1487)
* Update connection.DuplicateCredentials function to set correct ServerName 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.
* Use connection.DuplicateCredentials in cases where the connection key changes
* Extract TLS config key name generation to GetDBTLSConfigKey function
* Extract function to register a connection's TLS config with the mysql driver
This allows us to register TLS configuration is the various places
where connection configs are created and before they're used.
* Register TLS config when setting up master connection info
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]
* Register TLS config when setting up the throttler's connection info
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]
---------
Co-authored-by: meiji163 <meiji163@github.com>
0 commit comments