Orchestrator generates a lot of "Connection refused" log error when MySQL is not reachable/available

Description

When a MySQL server is not reachable/available for any reason, Orchestrator may try anyway to run a show global status like 'Uptime' but it gets a Connection Refused error.

On a large environment this can generate a lot of log entries and more time spent by Orchestrator trying to establish the connection.

Example:

[...] ERROR ReadTopologyInstance(hostname:3306) show global status like 'Uptime': dial tcp hostname:3306: connect: connection refused

Suggested fix:

The ReadTopologyInstanceBufferable function does that. A suggested fix could be using the go.Ping() to check if the db is actually connected to first.

After db, err := db.OpenDiscovery(instanceKey.Hostname,instanceKey.Port)

https://github.com/percona/orchestrator/blob/master/go/inst/instance_dao.go#L382

Environment

None

AFFECTED CS IDs

CS0027791

Attachments

1

Smart Checklist

Activity

Show:
Done

Details

Assignee

Reporter

Components

Fix versions

Affects versions

Priority

Smart Checklist

Created May 31, 2022 at 12:32 PM
Updated May 22, 2024 at 11:09 AM
Resolved July 27, 2022 at 2:06 PM