Skip to content

Commit 0fa2033

Browse files
committed
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]
1 parent 15daab8 commit 0fa2033

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

go/logic/throttler.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,9 @@ func (this *Throttler) collectControlReplicasLag() {
216216
lagResults := make(chan *mysql.ReplicationLagResult, instanceKeyMap.Len())
217217
for replicaKey := range *instanceKeyMap {
218218
connectionConfig := this.migrationContext.InspectorConnectionConfig.DuplicateCredentials(replicaKey)
219+
if err := connectionConfig.RegisterTLSConfig(); err != nil {
220+
return &mysql.ReplicationLagResult{Err: err}
221+
}
219222

220223
lagResult := &mysql.ReplicationLagResult{Key: connectionConfig.Key}
221224
go func() {

0 commit comments

Comments
 (0)