[MXS-4401] Can't Set maintenance on master Created: 2022-11-16  Updated: 2022-11-17  Resolved: 2022-11-16

Status: Closed
Project: MariaDB MaxScale
Component/s: maxctrl, Monitor
Affects Version/s: 6.4.1
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: febriyant Assignee: Unassigned
Resolution: Not a Bug Votes: 0
Labels: maintenance, switchover
Environment:

CentOS 7



 Description   

why on maxscale version 6.4.1 can't set maintenance on the master database.

Error: Server at http://172.17.71.33:8989 responded with 403 Forbidden to `PUT servers/dbsf7_v38_71_81/set?state=maintenance`
{
    "errors": [
        {
            "detail": "The server is master, so it cannot be set in maintenance or draining mode. First perform a switchover and then retry the operation."
        }
    ]
}

because in my case master DB some time have an issue on the VM side
so I need downtime and set maintenance on the master for make sure no transaction is coming to master
before we switch over manually.

because based on my experience if the master has issue on VM and we switchover using the command switchover on maxctrl is failed because VM is not responsif

is there way to set maintenance for master ?



 Comments   
Comment by markus makela [ 2022-11-16 ]

Yes, you can stop the monitor with maxctrl stop monitor <name-of-monitor> after which you can set the server into maintenance. The maintenance mode is prevented while the server is monitored to prevent it from triggering an automatic failover.

Comment by febriyant [ 2022-11-17 ]

Hi Markus thanks for the update
so when I test is ok is identical with my expectation

FYI actually we have inhouse application monitor and consume data from maxscale API
when run stop monitor we can't see data from the monitor. But is ok we accept that.

Thank you
this ticket can closed

Comment by markus makela [ 2022-11-17 ]

Are you using auto_failover in the monitor? If you are not using it, allowing the server to be set into maintenance makes more sense. We'll have to think if we want to change it so that this is only an error if the automatic cluster management operations are enabled.

Generated at Thu Feb 08 04:28:22 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.