[MXS-1933] maxscale starts monitoring not included servers in the service monitor Created: 2018-06-19  Updated: 2018-06-21  Resolved: 2018-06-19

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

Type: Bug Priority: Major
Reporter: Zdravelina Sokolovska (Inactive) Assignee: Unassigned
Resolution: Not a Bug Votes: 0
Labels: None
Environment:

CentOS 7.4; 1 MaxScale Node; 3 Master-Master Galera Nodes ;1 additional server


Attachments: File maxscale.cnf    

 Description   

maxscale starts monitoring not included servers in the service monitor

in the service monitor are included 3 servers : servers=server1,server2,server3,
but maxscale starts monitoring of all servers included in the [server] sections of cnf.

It would be expected to monitor only servers listed in the service monitors

There is only one service Monitor in the cfg
[Galera Monitor]
type=monitor
module=galeramon
servers=server1,server2,server3
user=root
passwd=1
monitor_interval=1000
 

server4 which is not included in the Service Monitor set of servers, is in  maxctrl server list
 
[root@t4w1 ff1]# maxctrl list servers
┌─────────┬─────────────────┬──────┬─────────────┬─────────────────────────┬──────┐
│ Server  │ Address         │ Port │ Connections │ State                   │ GTID │
├─────────┼─────────────────┼──────┼─────────────┼─────────────────────────┼──────┤
│ server1 │ 192.168.104.193 │ 3306 │ 0           │ Slave, Synced, Running  │      │
├─────────┼─────────────────┼──────┼─────────────┼─────────────────────────┼──────┤
│ server2 │ 192.168.104.195 │ 3306 │ 0           │ Slave, Synced, Running  │      │
├─────────┼─────────────────┼──────┼─────────────┼─────────────────────────┼──────┤
│ server3 │ 192.168.104.196 │ 3306 │ 0           │ Master, Synced, Running │      │
├─────────┼─────────────────┼──────┼─────────────┼─────────────────────────┼──────┤
│ server4 │ 172.20.2.208    │ 3306 │ 0           │ Running                 │      │
└─────────┴─────────────────┴──────┴─────────────┴─────────────────────────┴──────┘



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

The maxctrl list servers command lists all configured servers in MaxScale, even unmonitored ones. To list only the servers of a particular monitor, the output of maxctrl show monitor has it.

The Running state is expected as it is the default state of an unmonitored server. This is simply due to legacy reasons and is possibly going to change in 2.3.

Comment by markus makela [ 2018-06-19 ]

Closing as Not a Bug as this is expected behavior.

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

maxctrl show monitor, as well as maxadmin show monitor commands
give much more information about the monitor configuration and enumerate only the servers included in the
related service-Monitor.
e.g the maxctrl show monitor does not list the state of the servers , while the command 'maxctrl list servers' does,
so it's useful in that way.
From the other hand the not included servers in any service monitor are given with the state 'Running'
by 'maxctrl list servers' and that's the bug.
Will edit the description and reopen the issue.

Comment by markus makela [ 2018-06-21 ]

Yes, we can definitely change the default state of a server to Down, that makes perfect sense. But as this is a separate issue, could you open a separate bug for this?

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