43 Commits

Author SHA1 Message Date
Markus Makela
c5214bea1b Cleaned up code and changed function structure. 2015-08-28 12:54:38 +03:00
Markus Makela
296bdc5df6 Fixed errors and added comments. 2015-08-28 12:54:38 +03:00
Markus Makela
525daf827a Service are not started if user permissions are inadequate.
Also cleaned up code and error messages.
2015-08-28 12:54:38 +03:00
Markus Makela
cb2b465510 Changed queries to more closely match actual queries. 2015-08-28 12:54:38 +03:00
Markus Makela
b232c49742 Fixed function documentation. 2015-08-28 12:54:38 +03:00
Markus Makela
94eb1b4eb1 Added service and monitor permission checks. 2015-08-28 12:51:37 +03:00
Markus Makela
0062d9d2b7 Version errors for SHOW SLAVE STATUS now only print once. 2015-06-29 10:24:16 +03:00
Markus Makela
fe5e40e397 Added missing initialization of user and password variables in monitor_alloc. 2015-06-03 16:08:11 +03:00
Markus Makela
9c461450e2 Fixes to Coverity defects. 2015-05-22 05:36:58 +03:00
Markus Makela
91bc7b2792 Added missing spinlock calls to all monitors. 2015-05-21 11:41:11 +03:00
Markus Makela
7c7b322e1b Added missing default monitor interval. 2015-05-19 16:20:04 +03:00
Markus Makela
b94f494d80 Added filtering of monitor events. 2015-05-14 12:05:58 +03:00
Markus Makela
6e1a69df7e Changed callable monitor scripts to be called with command line parameters instead of having multiple scripts.
This reduces the amount of guesswork the monitor has to do when executing the script and places that burden on the called script.
2015-05-09 14:03:52 +03:00
Markus Makela
ba3c29c72b Fixed old function calls using monitor handle instead of MONITOR type. 2015-05-09 11:01:16 +03:00
Markus Makela
5a3ed0de9b Moved common monitor functionality to the MONITOR type
Common variables, like databases, timeouts and interval, and functionality was moved to the MONITOR type.
This reduces the redundant functionality of the monitor API's functions like registerServer and setInterval.
2015-05-09 04:47:17 +03:00
Markus Makela
3255979ca1 Fixed monitor handle not being NULL on initialization. 2015-03-12 14:45:39 +02:00
Markus Makela
63d83cd85d Monitor API 2.0.0 implemented. 2015-03-11 15:18:55 +02:00
Markus Makela
1b0fd4576a Merge branch 'maxinfo' into develop
Conflicts:
	server/core/service.c
	server/core/session.c
	server/include/session.h
2015-03-04 11:33:00 +02:00
Mark Riddoch
11e65f02f0 Addition of maxinfo show modules and show monitors commands 2015-02-19 13:32:48 +00:00
Markus Makela
ce063caf56 Fixed stopped monitors getting a call to monitorStop. 2015-02-17 21:47:11 +02:00
VilhoRaatikka
fd11e6a7f5 Session-specific logging. Added functions
void session_enable_log(SESSION* ses, logfile_id_t id)
and
void session_disable_log(SESSION* ses, logfile_id_t id)

Which switch specific log type on/off if the log type in question is not generally enabled.

Each thread carries a thread-specific struct log_info_t which includes members for current session id and bitfield for enabled log types for the current session. That information is checked before actual log write functions are called.

Each file where session-specific logging is used, must include the following exports:

/** Defined in log_manager.cc */
extern int            lm_enabled_logfiles_bitmask;
extern size_t         log_ses_count[];
extern __thread log_info_t tls_log_info;
2014-11-19 00:08:59 +02:00
MassimilianoPinto
62069f7ba9 Missing bracket
Missing bracket
2014-11-07 17:10:24 +01:00
MassimilianoPinto
39cc701b0d Branch update
Branch update
2014-11-07 16:59:01 +01:00
MassimilianoPinto
3b982ae820 Added monitor timeouts for connect/read/write
Added monitor timeouts for connect/read/write
2014-11-07 16:45:06 +01:00
MassimilianoPinto
6f22975e6c Added 'disable_master_failback' monitor option
Added 'disable_master_failback' option in Galera monitor
2014-10-30 19:03:07 +01:00
Markus Makela
b0683d9b4d Updated the licensing year from 2013 to 2013-2014 2014-10-01 14:37:12 +03:00
Markus Makela
f4e591e382 Changed 'SkySQL Gateway' to 'MariaDB Corporation MaxScale' 2014-09-30 13:15:03 +03:00
Markus Makela
c344231f80 Renamed all occurences of SkySQL to MariaDB Corporation 2014-09-30 13:02:10 +03:00
Mark Riddoch
d793382006 Make "list monitors" output consistant with the output from other list
commands
2014-09-25 08:31:29 +01:00
VilhoRaatikka
45f8585804 Fix to bug #549, http://bugs.skysql.com/show_bug.cgi?id=549
Each monitor loops 10 times/second (sleep 100ms) and perform monitoring checks only when monitor's interval is spent. Monitors notice faster if the shutdown flag is set and thus overall shutdown is faster.
hint.c:added missing header
Changed interval from unsigned long to size_t which is guaranteed to be of same size also in windows (if possible).
2014-09-23 11:26:15 +03:00
MassimilianoPinto
63d267e5ef Fix for broken replication
Fix for broken replication has been added to mysql_monitor.
Both Slave_IO  and Slave_SQL threads must be running in order to assign
the SERVER_SLAVE status but If only Slave_IO is running let’s assign
the master_id to current server and continue building the replication
tree; if no slaves at all the master will be still available.
The “detect_stale_master” option has been added, its default is 0.
If set to 1 the monitor will keep the last detected master even if the
replication setup is completely not working, i.e. both Slave_IO  and
Slave_SQL threads are not running: this applies only to the server that
was master before.
After monitor or MaxScale are restarted and the replication is still
stopped or not configured there will be no master because it’s not
possible to compute the replication topology tree.
2014-09-01 11:18:57 +02:00
Mark Riddoch
d6a2ef6996 Misc fixes to doxygen comments 2014-08-19 13:22:40 +01:00
Mark Riddoch
87e66a0ea8 Revert "Implementation of HTTPD protocol, gwbuf properties and a dmeo web application"
This reverts commit 6fd5dff34902051f38932947493280e1e62dbeb1.
2014-07-15 17:53:39 +01:00
Mark Riddoch
6fd5dff349 Implementation of HTTPD protocol, gwbuf properties and a dmeo web application
interface to test the new httpd.
2014-07-15 17:39:31 +01:00
Mark Riddoch
de5d4fda8b Merge of new user interface changes 2014-06-27 09:57:39 +01:00
Mark Riddoch
f96b762478 User interface improvements
Addition of enable/disable heartbeat, enable/disable root, list monitors,
show monitors

Better filter diagnostic output
2014-06-26 16:46:19 +01:00
MassimilianoPinto
fe0fcd75e4 new monitor routines
new monitor routines
2014-05-28 15:44:51 +02:00
MassimilianoPinto
798dd6a5a6 Added routines for interval and defaultId (MySQL)
Added routines for interval and defaultId (MySQL)
2014-05-28 11:51:58 +02:00
Mark Riddoch
7fe50a311f Addition of developer and user modes to debugcli
In order to be able to protect the interface so that mistyped argument
do not endanger MaxScale yet still allow the developer access a router
option has been added that gives the debugcli two modes.
2014-05-23 13:29:58 +01:00
vraatikka
d403018fd9 Surrounded every log writing command with LOGIF macro, which tests if the given logfile id matches with those enabled. The comparison is done against local variable and expensive function call is avoided. 2013-12-12 16:14:33 +02:00
vraatikka
701830f0ab Logging related (mostly) sanity checks and fixes.
- Checked argument types and counts
- Removed trailing line feeds
- Removed thread ids from error logs (they are used in trace / debug log
- Added some state information to dcbs
- Added prefix 'Error' or 'Fatal' to error logs.
- Switches all error logs to use flushing log write.
2013-09-30 11:14:36 +03:00
vraatikka
cae4d38a7e Removed unnecessary argument from log manager commands because it is not used and it is always NULL. 2013-08-04 23:30:47 +03:00
Timofey Turenko
a7c82310f9 moving files to /server to make merge possible 2013-07-28 05:31:11 +00:00