567ad9b8b8
Fix galeramon regression
...
The comparisons were wrong: strcasecmp returns 0 for equal strings.
2019-05-09 12:30:29 +03:00
7a5f11b752
Fix wrong check for wsrep_ready
...
wsrep_ready was check for ON/YES/1/true, but it has to be checked for OFF/NO/0/false as we are removing nodes, not joining.
2019-04-25 07:45:09 +03:00
9f7a7e473e
Enable galeramon to track wsrep_desync, wsrep_ready, wsrep_sst_donor_rejects_queries and wsrep_reject_queries
2019-04-25 07:45:09 +03:00
8c437c6440
Fix crash in galeramon
...
An std::string was assigned a null value which will cause a crash.
2019-01-04 12:00:48 +02:00
f87ff431c1
Merge branch '2.2' into 2.3
2018-11-27 11:46:47 +02:00
01628dd0de
Cleanup server version updating
2018-11-21 17:36:52 +02:00
84d45447fc
Fix formatting
2018-11-02 11:27:37 +02:00
cab40c54e4
Merge branch '2.2' into 2.3
2018-11-01 10:52:42 +02:00
9278da1f54
MXS-2067: Remove spinlock.h
...
Removed the spinlock.h header and replaced with plain pthread types and
functions.
2018-09-28 12:18:24 +03:00
71ffef5708
Partially revert 4ba011266843857bbd3201e5b925a47e88e1808f
...
Add back leading operator enforcement.
2018-09-20 15:57:30 +03:00
3b78996c4c
Merge branch '2.2' into develop
2018-09-17 13:02:53 +03:00
4e41978069
Merge branch '2.2' into develop
2018-09-14 10:41:43 +03:00
c447e5cf15
Uncrustify maxscale
...
See script directory for method. The script to run in the top level
MaxScale directory is called maxscale-uncrustify.sh, which uses
another script, list-src, from the same directory (so you need to set
your PATH). The uncrustify version was 0.66.
2018-09-09 22:26:19 +03:00
3f53eddbde
MXS-2020 Replace ss[_info]_dassert with mxb_assert[_message]
2018-08-22 11:34:59 +03:00
cf0aeed516
MXS-2014 Rename log_manager.h to log.h
...
There's nothing resembling a manager anymore.
2018-08-17 10:59:37 +03:00
b9ec3f5130
Monitor json diagnostics printing cleanup
...
The 'events' and 'script' config values were defined for every monitor.
Removed the extra definitions and moved the variables to MXS_MONITOR.
MariaDBMonitor was printing config values a second time, they are
already printed by the caller.
Moved the events enum definition to the internal header since it's no longer
required by modules.
Added a default config setting "all" to 'events' to clarify that it enables
all events.
2018-08-10 11:19:09 +03:00
fbce38878b
Turn server status macros to functions
2018-07-25 11:19:47 +03:00
a59c0c61ce
Remove depth field from SERVER
...
It was not really used anymore.
2018-06-29 10:54:34 +03:00
cc0299aee6
Update change date of 2.3
2018-06-25 10:07:52 +03:00
9d961ece3a
Clear galeramon server info in pre_tick
...
The server information in galeramon is gathered every monitoring
interval. To prevent stale information from being used, the server
information needs to be cleared at the start of each monitoring interval.
2018-06-18 14:25:05 +03:00
c798a4ae36
Remove use of HASHTABLE in galeramon
...
Replaced the HASHTABLE in galeramon with an std::unordered_map. This
simplifies the code by a great amount and makes it more readable. Removed
the extraneous functions that mostly logged debug information and
simplified the logic by removing redundant checks.
2018-06-11 10:22:23 +03:00
9263a06b15
Fix galera master selection
...
The master selection still used the current status instead of the pending
status. This caused the master selection to lag behind by one monitor
loop.
2018-06-11 10:22:23 +03:00
dd49d4faea
Check pending Synced status in Galeramon
...
The pending status must be used, not the current.
2018-06-08 14:41:11 +03:00
9f5358eac0
Remove server_get_parameter_nolock
...
The function is no longer needed as there is no recursive access to the
server.
2018-06-08 14:41:11 +03:00
8afa8c2c5a
MXS-1775 Add MonitorInstanceSimple class
...
MonitorInstanceSimple is intended for simple monitors that
probe servers in a straightforward fashion. More complex monitors
can be derived directly from MonitorInstance.
2018-06-07 15:13:26 +03:00
ebcb807438
MXS-1775 Add default implementations
2018-06-01 13:48:15 +03:00
9b7e37e112
MXS-1775 Change MonitorInstance::configure() prototype
...
Now return boolean, to allow derived class to signal a failure
to configure.
2018-06-01 13:48:15 +03:00
0783af88ed
MXS-1775 Make general cleanup
...
Document and rearrrange so that things look nice and tidy.
2018-06-01 13:48:15 +03:00
76cfe7291d
MXS-1775 Move module entry point to the end of the file
...
Now the same way in all monitors.
2018-06-01 13:48:15 +03:00
b439857a84
MXS-1775 Remove destroy()
...
Now the instance is deleted simply by deleting it.
2018-06-01 13:48:15 +03:00
0833db8a48
MXS-1775 Flush pending status to servers using common code
2018-06-01 13:48:15 +03:00
15b1c270a3
MXS-1775 Check connection in MonitorInstance::tick()
...
Since the connection checking is done in an identical fashion in
all monitors, it can be moved to the base-class.
2018-06-01 13:48:15 +03:00
4a5ed6ce7f
MXS-1775 Fix GaleraMonitor to update pending_status
2018-06-01 13:48:15 +03:00
c0ace6a694
MXS-1775 Rename server_clear_set_status
...
Renamed to server_clear_set_status_nolock, like all other non-locking
functions are called. Rename arguments to be self-explanatory.
2018-06-01 13:48:15 +03:00
f50ebfce2a
MXS-1775 Set/clear initial bits similarly in all monitors
2018-06-01 13:48:15 +03:00
8d1b8a1774
MXS-1775 Handle connection error the same way
...
All monitors (but for MariaDBMon) now handle connection errors in
the same manner.
An exception is MMMon that modifies both the server status and the
monitor status. However, in fact, all other monitors do it the wrong
way and update the server status directly instead of only the monitor
status that then at the end of the loop should be copied to the server
status.
2018-06-01 13:48:15 +03:00
5196371762
MXS-1775 Use same arrangement in update_server_status
...
All monitors (but possible for MariaDBMon) now handle the
connecting to the server in the same way, that is, if the
connecting fails, then the status is updated and we return.
2018-06-01 13:48:15 +03:00
df4e19eb27
MXS-1775 Provide default implementation for MonitorInstance::tick
2018-06-01 13:48:15 +03:00
68505a0bcb
MXS-1775 Consistently name the argument to update_server_status()
2018-06-01 13:48:15 +03:00
cb1da5538c
MXS-1775 Monitoring function named consistently
...
The main monitoring function now has the same name in all
monitors (except MariaDBMonitor) and is a member function.
2018-06-01 13:48:15 +03:00
f3973b331f
Fix rebase error.
2018-05-18 16:00:05 +03:00
650a739c92
MXS-1775 Move monitor loop to MonitorInstance
2018-05-18 16:00:05 +03:00
db30ea96f2
MXS-1775 m_master is now a member variable of MonitorInstance
2018-05-18 16:00:05 +03:00
6eef6f52db
MXS-1775 Wait the same way in all monitors
2018-05-18 16:00:05 +03:00
2396b555f8
MXS-1775 Monitor loop and monitoring separated
...
In preparation for moving the monitor loop to MonitorInstance.
2018-05-18 16:00:05 +03:00
6fff5a4f23
MXS-1775 Preparatory work for moving main loop to MonitorInstance
2018-05-18 16:00:05 +03:00
6db4ce54a9
MXS-1775 MonitorInstance now calls mysql_thread_[init|finish]()
2018-05-18 16:00:05 +03:00
15e3a2887c
MXS-1775 Move status management to MonitorInstance
2018-05-18 16:00:05 +03:00
1e084b78b1
MXS-1775 MonitorInstance::m_script is now a std::string
2018-05-18 16:00:05 +03:00
c7eb0a9958
MXS-1775 Thread starting is now handled by MonitorInstance
2018-05-18 16:00:05 +03:00