Details
- 
    Bug 
- 
    Status: Closed (View Workflow)
- 
    Major 
- 
    Resolution: Duplicate
- 
    23.08.4
- 
    Linux n.a.
Description
When we have a Sharding Cluster with SchemaRouter we could come to the idea to drain/set to maintenance a Shard (for example for upgrade the db or the server including a reboot). For this I would have expected to work drain/maintenance.
maxctrl list servers
┌────────┬──────────────┬──────┬─────────────┬─────────────────┬──────────────┬─────────────────┐
│ Server │ Address      │ Port │ Connections │ State           │ GTID         │ Monitor         │
├────────┼──────────────┼──────┼─────────────┼─────────────────┼──────────────┼─────────────────┤
│ shard2 │ 10.139.158.1 │ 3364 │ 1           │ Master, Running │ 0-3364-69817 │ MariaDB-Monitor │
├────────┼──────────────┼──────┼─────────────┼─────────────────┼──────────────┼─────────────────┤
│ shard3 │ 10.139.158.1 │ 3365 │ 1           │ Running         │ 0-3365-63166 │ MariaDB-Monitor │
├────────┼──────────────┼──────┼─────────────┼─────────────────┼──────────────┼─────────────────┤
│ shard4 │ 10.139.158.1 │ 3366 │ 1           │ Running         │ 0-3366-6902  │ MariaDB-Monitor │
└────────┴──────────────┴──────┴─────────────┴─────────────────┴──────────────┴─────────────────┘
maxctrl set server shard2 drain
maxctrl set server shard2 maintenance
But I am getting an error:
Error: Server at http://127.0.0.1:8989 responded with 400 Bad Request to `PUT servers/shard2/set?state=drain`
{
    "errors": [
    ]
}
As I wrote before I do not understand the concept of "Master" in a sharding system.
So when I try to "switchover" the master role to another shard I get the following error:
maxctrl call command mariadbmon switchover MariaDB-Monitor shard3 shard2
Error: Server at http://127.0.0.1:8989 responded with 400 Bad Request to `POST maxscale/modules/mariadbmon/switchover?MariaDB-Monitor&shard3&shard2`
{
    "links": 
,
    "meta": {
        "errors": [
            
,
{ "detail": "Switchover cancelled." }        ]
    }
}
So I am a bit clueless now, how I should proceed...
@Markus: I wrote everything down for a blog article, if you want to cross-read before publishing, please let me know...
Attachments
Issue Links
- duplicates
- 
                    MXS-4964 Simple sharding tutorial is out of date -         
- Closed
 
-