[MXS-1922] The GTID of Galera Nodes is not displayed by maxctrl server list Created: 2018-06-13  Updated: 2019-04-18  Resolved: 2019-04-18

Status: Closed
Project: MariaDB MaxScale
Component/s: galeramon
Affects Version/s: 2.2.9
Fix Version/s: 2.4.0

Type: New Feature Priority: Major
Reporter: Zdravelina Sokolovska (Inactive) Assignee: markus makela
Resolution: Fixed Votes: 0
Labels: None
Environment:

3 Mater-Master Galera Nodes; CentOS 7.4


Issue Links:
Relates
relates to MXS-1894 MariaDBMon must show slave's GTID inf... Closed

 Description   

The GTID of Galera Nodes is not displayed by maxctrl server list

depend on the gelera docs the GTID of galera Node consists of 2 components: State UUID and Ordinal Sequence Number
State UUID:Ordinal Sequence Number

it would be useful to display the GTID in galera GTID format for the monitored galera servers

#  maxctrl list  servers
┌─────────┬─────────────────┬──────┬─────────────┬─────────────────────────┬──────┐
│ Server  │ Address         │ Port │ Connections │ State                   │ GTID │
├─────────┼─────────────────┼──────┼─────────────┼─────────────────────────┼──────┤
│ server1 │ 192.168.104.193 │ 3306 │ 0           │ Master, Synced, Running │      │
├─────────┼─────────────────┼──────┼─────────────┼─────────────────────────┼──────┤
│ server2 │ 192.168.104.195 │ 3306 │ 0           │ Running                 │      │
├─────────┼─────────────────┼──────┼─────────────┼─────────────────────────┼──────┤
│ server3 │ 192.168.104.196 │ 3306 │ 0           │ Slave, Synced, Running  │      │
└─────────┴─────────────────┴──────┴─────────────┴─────────────────────────┴──────┘
[root@t4w1 /]#

the GTID taken from server1 and server3
3c15149f-5766-11e8-9a99-22bc53d40581:26987

MariaDB [(none)]>  show status like '%wsrep_local_state_uuid%';
+------------------------+--------------------------------------+
| Variable_name          | Value                                |
+------------------------+--------------------------------------+
| wsrep_local_state_uuid | 3c15149f-5766-11e8-9a99-22bc53d40581 |
+------------------------+--------------------------------------+
1 row in set (0.001 sec)
 

MariaDB [(none)]> show status like '%wsrep_last_committed%';
+----------------------+-------+
| Variable_name        | Value |
+----------------------+-------+
| wsrep_last_committed | 26987 |
+----------------------+-------+
1 row in set (0.001 sec)

the GTID taken from server2
3c15149f-5766-11e8-9a99-22bc53d40581:26985

MariaDB [(none)]> show status like '%wsrep_local_state_uuid%';
+------------------------+--------------------------------------+
| Variable_name          | Value                                |
+------------------------+--------------------------------------+
| wsrep_local_state_uuid | 3c15149f-5766-11e8-9a99-22bc53d40581 |
+------------------------+--------------------------------------+
1 row in set (0.001 sec)
 
MariaDB [(none)]> show status like '%wsrep_last_committed%';
+----------------------+-------+
| Variable_name        | Value |
+----------------------+-------+
| wsrep_last_committed | 26985 |
+----------------------+-------+
1 row in set (0.001 sec)



 Comments   
Comment by markus makela [ 2018-06-13 ]

This is expected as the GTID value was only added for MariaDBMon. I'll change this to a feature request.

Comment by markus makela [ 2018-06-21 ]

Closing as a duplicate of MXS-1894.

Comment by Zdravelina Sokolovska (Inactive) [ 2018-06-22 ]

not exactly the same as MXS-1894 .In MXS-1894 are used slave servers,
MXS-1922 is about Galera Master-Master cluster setup

MaxScale> show monitor  Galera-Monitor
Incorrect number of arguments: show monitor expects 1 arguments
MaxScale>  show monitor Galera-Monitor
Monitor:                0x24bc870
Name:                   Galera-Monitor
State:                  Running
Sampling interval:      1000 milliseconds
Connect Timeout:        3 seconds
Read Timeout:           1 seconds
Write Timeout:          2 seconds
Connect attempts:       1
Monitored servers:      [192.168.104.193]:3306, [192.168.104.195]:3306, [192.168.104.196]:3306
Master Failback:        on
Available when Donor:   off
Master Role Setting Disabled:   off
Use Priorities: off
Set wsrep_sst_donor node list:  off
Galera Cluster UUID:    3c15149f-5766-11e8-9a99-22bc53d40581
Galera Cluster size:    3

Comment by Zdravelina Sokolovska (Inactive) [ 2018-06-22 ]

You have actually the wsrep_cluster_state_uuid as get above from maxadmin ; Galera Cluster UUID: 3c15149f-5766-11e8-9a99-22bc53d40581

below , the corresponding variable  wsrep_cluster_state_uuid get from Node
MariaDB [(none)]> show status like '%wsrep_cluster_state_uuid%' \G
*************************** 1. row ***************************
Variable_name: wsrep_cluster_state_uuid
        Value: 3c15149f-5766-11e8-9a99-22bc53d40581

for Galera GTID it's needed also State UUID and Ordinal Sequence Number,

┌─────────┬─────────────────┬──────┬─────────────┬─────────────────────────┬──────┐
 
│ Server  │ Address         │ Port │ Connections │ State                   │ GTID │
 
├─────────┼─────────────────┼──────┼─────────────┼─────────────────────────┼──────┤
 
│ server1 │ 192.168.104.193 │ 3306 │ 0           │ Master, Synced, Running │      │
 
├─────────┼─────────────────┼──────┼─────────────┼─────────────────────────┼──────┤
 
│ server2 │ 192.168.104.195 │ 3306 │ 0           │ Running                 │      │
 
├─────────┼─────────────────┼──────┼─────────────┼─────────────────────────┼──────┤
 
│ server3 │ 192.168.104.196 │ 3306 │ 0           │ Slave, Synced, Running  │      │
 
└─────────┴─────────────────┴──────┴─────────────┴─────────────────────────┴──────┘

It would be useful to retrieve that information by MaxScale.

Comment by markus makela [ 2018-06-22 ]

winstone I've reopened the issue. I think I misunderstood this to mean the MariaDB GTID (e.g. 0-1-123) but the idea of using the UUID and sequence is a good one and easy to implement.

Comment by markus makela [ 2018-06-22 ]

Adding here as a note to self: The variable name is wsrep_last_committed

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