[MXS-3677] The GTID of Galera Nodes is not displayed by maxctrl server list | maxscale 2.5.13 Created: 2021-07-19  Updated: 2021-09-14  Resolved: 2021-07-28

Status: Closed
Project: MariaDB MaxScale
Component/s: galeramon
Affects Version/s: 2.5.13
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Pon Suresh Pandian (Inactive) Assignee: Unassigned
Resolution: Not a Bug Votes: 1
Labels: None
Environment:

CentOS Linux release 7.7.1908 (Core)
MariaDB server - 10.5.10 (ES)


Attachments: HTML File GTID_maxscale_test    

 Description   

I have installed 2 node galera cluster along with maxscale. If i run "maxctrl list servers" command It's showing only server1 GTID not other server.

[root@ip-172-31-12-219 centos]# maxctrl list servers
┌─────────┬──────────────┬──────┬─────────────┬─────────────────────────┬────────┐
│ Server │ Address │ Port │ Connections │ State │ GTID │
├─────────┼──────────────┼──────┼─────────────┼─────────────────────────┼────────┤
│ server1 │ 18.207.3.40 │ 3333 │ 0 │ Master, Synced, Running │ 1-1-15 │
├─────────┼──────────────┼──────┼─────────────┼─────────────────────────┼────────┤
│ server2 │ 54.237.3.158 │ 3333 │ 0 │ Slave, Synced, Running │ │
└─────────┴──────────────┴──────┴─────────────┴─────────────────────────┴────────┘

If I stopped the mariadb service on server1. Now server2 is promoted as a master and performed some writes on server2.

MariaDB [test]> create table t1 (id int,name varchar(20));
Query OK, 0 rows affected (0.010 sec)

MariaDB [test]> insert into t1 values(1,'kjsdlad');
Query OK, 1 row affected (0.002 sec)

MariaDB [test]> insert into t1 values(2,'mmznb');
Query OK, 1 row affected (0.001 sec)

MariaDB [test]> insert into t1 values(3,'rock');
Query OK, 1 row affected (0.002 sec)

MariaDB [test]> insert into t1 values(4,'khlcsk');
Query OK, 1 row affected (0.002 sec)

MariaDB [test]> insert into t1 values(5,'lcsk');
Query OK, 1 row affected (0.004 sec)

In maxscale it's not showing any GTID on server2. Why this behaviour ?

[root@ip-172-31-12-219 centos]# maxctrl list servers
┌─────────┬──────────────┬──────┬─────────────┬─────────────────────────┬──────┐
│ Server │ Address │ Port │ Connections │ State │ GTID │
├─────────┼──────────────┼──────┼─────────────┼─────────────────────────┼──────┤
│ server1 │ 18.207.3.40 │ 3333 │ 0 │ Down │ │
├─────────┼──────────────┼──────┼─────────────┼─────────────────────────┼──────┤
│ server2 │ 54.237.3.158 │ 3333 │ 0 │ Master, Synced, Running │ │
└─────────┴──────────────┴──────┴─────────────┴─────────────────────────┴──────┘

Here I have attached my maxscale config for your reference please check it.



 Comments   
Comment by markus makela [ 2021-07-19 ]

Looking at the source code the value is from the following query:

SELECT @@gtid_current_pos, @@gtid_binlog_pos, @@read_only, @@server_id;

What does it return on your servers?

Comment by Pon Suresh Pandian (Inactive) [ 2021-07-19 ]

Hi markus,

Here i have mentioned the output please check it.

Server1 :
---------

MariaDB [(none)]> SELECT @@gtid_current_pos, @@gtid_binlog_pos, @@read_only, @@server_id;
-----------------------------------------------------------+

@@gtid_current_pos @@gtid_binlog_pos @@read_only @@server_id

-----------------------------------------------------------+

1-1-20 1-1-20 0 1

-----------------------------------------------------------+
1 row in set (0.000 sec)

Server2 :
--------

MariaDB [(none)]> SELECT @@gtid_current_pos, @@gtid_binlog_pos, @@read_only, @@server_id;
-----------------------------------------------------------+

@@gtid_current_pos @@gtid_binlog_pos @@read_only @@server_id

-----------------------------------------------------------+

  1-1-20 0 3

-----------------------------------------------------------+
1 row in set (0.000 sec)

Comment by markus makela [ 2021-07-19 ]

I think the lack of @@gtid_current_pos is the reason why it doesn't show the GTID position.

Comment by Pon Suresh Pandian (Inactive) [ 2021-07-19 ]

Hi markus,

I am not sure exactly ,so I created a new Jira to engineering team. Waiting for their reply.

Comment by markus makela [ 2021-07-19 ]

What version of MariaDB are you using? I think this behavior might change if you use Galera from 10.6 with the GTID improvements it has.

Comment by Pon Suresh Pandian (Inactive) [ 2021-07-20 ]

Hi Markus,

I tried with MariaDB server - 10.5.10 (ES)

Comment by markus makela [ 2021-07-28 ]

I'll close this as Not a Bug since this seems to be related to Galera not updating the value of the current GTID. MaxScale correctly shows the GTID for all the nodes that have one and only the ones that don't have aren't showing it.

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