[MXS-2449] Maxadmin shows wrong monitor status Created: 2019-04-23  Updated: 2019-07-10  Resolved: 2019-07-08

Status: Closed
Project: MariaDB MaxScale
Component/s: maxadmin, maxinfo, Monitor
Affects Version/s: 2.3.5
Fix Version/s: 2.3.9, 2.3.10

Type: Bug Priority: Major
Reporter: Arthur Kono Assignee: markus makela
Resolution: Fixed Votes: 0
Labels: None
Environment:

Debian 9


Sprint: MXS-SPRINT-86

 Description   

After MaxScale upgrade 2.2.20 -> 2.3.5 Maxadmin and JSON started to show wrong MariaDB-Monitor status (Stopped instead of Running). Maxctrl do not affected with this bug:

root@ims# maxctrl list monitors
┌─────────────────┬─────────┬────────────┐
│ Monitor         │ State   │ Servers    │
├─────────────────┼─────────┼────────────┤
│ MariaDB-Monitor │ Running │ ims1, ims2 │
└─────────────────┴─────────┴────────────┘
root@ims# maxadmin list monitors                    
---------------------+--------------------
Monitor              | Status
---------------------+--------------------
MariaDB-Monitor      | Stopped
---------------------+--------------------
root@ims# maxadmin shutdown monitor MariaDB-Monitor
root@ims# maxctrl list monitors                    
┌─────────────────┬─────────┬────────────┐
│ Monitor         │ State   │ Servers    │
├─────────────────┼─────────┼────────────┤
│ MariaDB-Monitor │ Stopped │ ims1, ims2 │
└─────────────────┴─────────┴────────────┘
root@ims# maxadmin list monitors                   
---------------------+---------------------
Monitor              | Status
---------------------+---------------------
MariaDB-Monitor      | Stopped
---------------------+---------------------
root@ims# maxadmin restart monitor MariaDB-Monitor 
root@ims# maxctrl list monitors                   
┌─────────────────┬─────────┬────────────┐
│ Monitor         │ State   │ Servers    │
├─────────────────┼─────────┼────────────┤
│ MariaDB-Monitor │ Running │ ims1, ims2 │
└─────────────────┴─────────┴────────────┘
root@ims# maxadmin list monitors                  
---------------------+--------------------
Monitor              | Status
---------------------+--------------------
MariaDB-Monitor      | Stopped
---------------------+--------------------
 
root@ims# maxadmin show monitor MariaDB-Monitor
Monitor:                0x561abe342bc0
Name:                   MariaDB-Monitor
State:                  Running
Times monitored:        3070
Sampling interval:      2000 milliseconds
Connect Timeout:        3 seconds
Read Timeout:           1 seconds
Write Timeout:          2 seconds
Connect attempts:       1 
Monitored servers:      [ims1]:3306, [ims2]:3306
Automatic failover:     Disabled
Failcount:              5
Failover timeout:       90
Switchover timeout:     90
Automatic rejoin:       Disabled
Enforce read-only:      Disabled
Detect stale master:    Enabled
 
Server information:
-------------------

Config:

[MariaDB-Monitor]
type=monitor
module=mariadbmon
servers=ims1,ims2
user=******
password=*******
monitor_interval=2000



 Comments   
Comment by markus makela [ 2019-07-08 ]

Looks to be fixed in 2.3.9.

Comment by markus makela [ 2019-07-08 ]

Monitor states after startup on 2.3.9 appear to be correct.

Comment by Arthur Kono [ 2019-07-10 ]

With v2.3.9 JSON printout still shows wrong status:
http://localhost:6444/monitors
Monitor "MariaDB-Monitor"
Status "Stopped"

Comment by markus makela [ 2019-07-10 ]

Are you using the maxinfo module? Looks like it still used an old check.

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