Details
-
New Feature
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Won't Fix
-
None
-
None
-
MXS-SPRINT-192
Description
Either a force failover or cluster refresh option request is to have a way to make a server master regardless of risk. This was spurred from a situation where a outage was extended when we had to remove a bad server from the cnf and restart maxscale to promote a known up-to-date slave. Need her is a situation where the admin knows what needs to be done but the technology is clocking the action.
Example command
maxctrl call command mariadbmon failover MariaDB-Monitor --force
|
WARNING: Replica could be out of date introducing dataloss. Continue (Y/n) Y
|
fooshop-2 is now master
|
below status of a issue cluster due to gtid repl off
[ACME] mariadb@maxscale-1: ~ $ maxctrl list servers
|
┌───────────┬──────────────┬──────┬─────────────┬────────────────┬─────────┬─────────────────┐
|
│ Server │ Address │ Port │ Connections │ State │ GTID │ Monitor │
|
├───────────┼──────────────┼──────┼─────────────┼────────────────┼─────────┼─────────────────┤
|
│ fooshop-1 │ 131.21.1.185 │ 3306 │ 0 │ Down │ 0-1-111 │ MariaDB-Monitor │
|
├───────────┼──────────────┼──────┼─────────────┼────────────────┼─────────┼─────────────────┤
|
│ fooshop-2 │ 131.21.1.248 │ 3306 │ 0 │ Slave, Running │ 0-1-111 │ MariaDB-Monitor │
|
├───────────┼──────────────┼──────┼─────────────┼────────────────┼─────────┼─────────────────┤
|
│ fooshop-3 │ 131.21.1.89 │ 3306 │ 0 │ Slave, Running │ 0-1-111 │ MariaDB-Monitor │
|
└───────────┴──────────────┴──────┴─────────────┴────────────────┴─────────┴─────────────────┘
|
|
|
'fooshop-2' cannot be selected because its replica connection to 'fooshop-1' is not using gtid.
|
'fooshop-3' cannot be selected because its replica connection to 'fooshop-1' is not using gtid.
|
|
[ACME] mariadb@maxscale-1: ~ $ maxctrl call command mariadbmon failover MariaDB-Monitor
|
Error: Server at http://127.0.0.1:8989 responded with 400 Bad Request to `POST maxscale/modules/mariadbmon/failover?MariaDB-Monitor`
|
{
|
"links": {
|
"self": "http://127.0.0.1:8989/v1/maxscale/modules/mariadbmon/failover/"
|
},
|
"meta": {
|
"errors": [
|
{
|
"detail": "No suitable promotion candidate found:\n'fooshop-2' cannot be selected because its replica connection to 'fooshop-1' is not using gtid.\n'fooshop-3' cannot be selected because its replica connection to 'fooshop-1' is not using gtid."
|
},
|
{
|
"detail": "Could not autoselect promotion target for failover."
|
},
|
{
|
"detail": "Cluster gtid domain is unknown. This is usually caused by the cluster never having a primary server while MaxScale was running."
|
},
|
{
|
"detail": "The slave connection 'fooshop-2' -> 'fooshop-1' is not using gtid replication."
|
},
|
{
|
"detail": "The slave connection 'fooshop-3' -> 'fooshop-1' is not using gtid replication."
|
},
|
{
|
"detail": "Failover cancelled."
|
}
|
]
|
}
|
}
|
Attachments
Issue Links
- relates to
-
MXS-3983 Add switchover-force command
- Closed