Clustered maxscale - determining node that holds locks

303 views
Skip to first unread message

Chris Page

unread,
Apr 9, 2021, 7:08:36 AM4/9/21
to MaxScale
Hi,

I'm running Maxscale 2.5 in a clustered configuration using Keepalived. Each instance uses the `majority_of_running` cooperative monitoring locks to ensure that only one instance of Maxscale can make potentially dangerous changes at any one time.

I'm trying to work out a way of determining the current Maxscale instance that holds the lock on the database. This way I can prioritise where to point our floating IP address.

Does anyone know how I can determine if the current Maxscale instance is holding the lock?

Thanks,
Chris.

Markus Mäkelä

unread,
Apr 9, 2021, 7:58:23 AM4/9/21
to maxs...@googlegroups.com

Hi,

The output of maxctrl show monitor <monitor-name> has the information: it's stored in the primary field of the monitor diagnostic (read the last paragraph in the documentation). Alternatively, you can use the maxctrl api get command to fetch the raw JSON result or connect directly to the REST API with curl. The REST API resource you'd be looking into is the monitor resource. It also happens to contain the example output from a mariadbmon and it does have the primary field.

Markus

--
You received this message because you are subscribed to the Google Groups "MaxScale" group.
To unsubscribe from this group and stop receiving emails from it, send an email to maxscale+u...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/maxscale/ff6387d6-ef58-4836-8c22-2a63e02f3252n%40googlegroups.com.
-- 
Markus Mäkelä, Senior Software Engineer
MariaDB Corporation
Reply all
Reply to author
Forward
Message has been deleted
0 new messages