85 Commits

Author SHA1 Message Date
Markus Makela
d3da98b58f Merge branch 'MXS-544' into develop-MXS-544-merge 2016-03-03 21:39:39 +02:00
Johan Wikman
cb3213af63 server/include/poll.h renamed to server/include/maxscale/poll.h
Due to an include conflict between /usr/include/poll.h and
maxscale/server/include/poll.h the latter was moved to
maxscale/server/include/maxscale/poll.h.

Once 1.4 is out, all maxscale header files will be moved to that
same sub-directory. That will prevent include conflicts and also
make it easy to see which include files belong to maxscale and
which do not.
2016-03-01 12:56:39 +02:00
counterpoint
395cbdc103 Simplify handling of "client data" by having a pointer to it only in DCB and not in session structure. Change name of session->client to session->client_dcb for greater clarity. Temporary free of client data in DCB, to be moved to authenticator when it becomes a module. Fix incorrect name of listener_alloc. 2016-02-23 11:13:21 +00:00
Johan Wikman
384029c109 MaxScale log called consistently for maxlog
There were some variance regarding the way the MaxScale log (i.e.
the file log) was called; "maxlog" in configuration file and
"maxscalelog" at the command line and maxadmin interface. Now it
is uniformly referred to as "maxlog" in the configuration file, at
the command line, from maxadmin and in the code.
2015-11-27 16:10:37 +02:00
Johan Wikman
2feb2ed3a2 Prevent disabling error log priority.
It should not be possible to disable the error priority as error
messages should always be logged.

In addition some minor corrections of command line texts.
2015-11-27 16:09:57 +02:00
Johan Wikman
af6ec7f346 Allow [en|dis]abling of [sys|maxscale]log via maxadmin.
The syslog and maxscalelog can now be enabled and disabled at
runtime using maxadmin.
2015-11-25 09:16:17 +02:00
Johan Wikman
a8535f42af Remove all traces of logfile_t
The earlier log file based approach for enabling and disabling
messages has now been completely replaced with the syslog priority
based approach.

Similarly as with log files before it is now possible to enable
and disable a log priority for a particular session, even though
it apparently has not been used much.

The local test-programs of the logging has got minimal attention
only to make them compile. They should get an overhaul as they did
not work before either.
2015-11-23 19:10:53 +02:00
Markus Makela
6641c42ef9 Added sync logs command to maxadmin
Added maxadmin command to flush all logs to disk. This will allow tests
to gather all logs without having to wait for the logs to be flushed by
the log flusher thread.
2015-11-17 09:17:59 +02:00
Johan Wikman
bcb918e60b Log: Another step in the move from logfiles to priorities.
skygw_[enable|disable]_log has now been removed from the external
interface and priorities must instead be set using
mxs_log_set_priority_enabled(int priority, bool enabled). A bitmask
is already being updated, but internally and as used by the LOG_IF
macros, the actual enabling is still made using logfile ids.

The configuration entries have been replaced as follows:

	log_messages -> log_notice
	log_trace    -> log_info

The old ones can be used, but cause a warning to be logged.

Similarily the maxadmin commands have been updated.
"[enable|disable] log ..." works as expected, but there will be
a message about it being deprecated. Instead there is now a
[enable|disable] log-priority err|warning|notice|info|debug
command that should be used instead.
2015-11-14 22:28:17 +02:00
Markus Makela
6b88b6b17f Merge branch 'develop' into MXS-329-develop-20151111 2015-11-13 07:48:59 +02:00
Johan Wikman
2c1b53c120 Log: Cleanup of API
skygw_ functions removed and replaced with mxs_ equivalents.
logfile_id_t removed.
2015-11-12 18:31:53 +02:00
Johan Wikman
bdfd72404b Log: skygw_log_rotate replaced with mxs_log_rotate.
With only one log-file no arguments are needed. The maxadmin command
'flush log'  still accepts all the previous arguments, but warns about
them being deprecated.
2015-11-12 14:48:37 +02:00
Markus Makela
9ab5326960 Fix to MXS-438: https://mariadb.atlassian.net/browse/MXS-438
Maxinfo now supports the shutdown command which shuts down a service, monitor
or MaxScale itself and the restart command which restarts a stopped monitor
or service.
2015-11-11 18:59:39 +02:00
counterpoint
2183d5d3c5 Fix mistakes in merging. 2015-11-11 11:31:07 +00:00
counterpoint
dee20fe077 Merge remote-tracking branch 'origin/develop' into MXS-329-develop-20151111
# Conflicts:
#	server/core/CMakeLists.txt
#	server/core/buffer.c
#	server/core/service.c
#	server/modules/filter/tee.c
#	server/modules/monitor/mysql_mon.c
#	server/modules/routing/binlog/blr.c
#	server/modules/routing/binlog/blr_slave.c
#	server/modules/routing/debugcmd.c
#	server/modules/routing/readwritesplit/readwritesplit.c
#	utils/skygw_utils.cc

- resolved.
2015-11-11 11:08:02 +00:00
counterpoint
1fc6b00211 Add conditionally compiled mechanism to "show buffers" to give a list of the currently allocated buffers, with a trace for each one of the calls that led to its creation. 2015-11-11 09:03:48 +00:00
Johan Wikman
b19a4b9f4a Commands for enabling the log priority added to maxadmin.
Enabling log files is accepted but deprecated.
2015-11-06 10:06:54 +02:00
Johan Wikman
33294e4c95 Whitespace and indentation changes.
- Tabs replaced with spaces.
- Indentation level 4 spaces.
- Allman braces (except for part of commands)
- Space after ,
- Spaces around binary operators.

No other changes.
2015-11-06 10:06:35 +02:00
Markus Makela
06f6b28048 Fix to MXS-412: https://mariadb.atlassian.net/browse/MXS-412
service->user is now set to NULL after the users are freed.
2015-10-19 09:01:58 +03:00
Johan Wikman
160bbb70ee MXS-251: strerror
Replaces all calls to strerror with calls to strerror_r. The former
is non-thread safe while the latter is.
2015-09-05 15:52:13 +03:00
counterpoint
09fdb0a2c2 Hopefully final tidy up. 2015-06-23 14:58:53 +01:00
counterpoint
351f52b8e1 Add "show persistent {server}" 2015-05-27 09:57:18 +01:00
Markus Makela
90875c1164 Cleaned up unused variables. 2015-03-11 18:12:18 +02:00
Markus Makela
63d83cd85d Monitor API 2.0.0 implemented. 2015-03-11 15:18:55 +02:00
MassimilianoPinto
5bbd9a66fc Added show feedbackreport
Added show feedbackreport
2015-03-06 11:15:06 +01:00
MassimilianoPinto
e952db0ee9 Notification server integration
Notification server integration: added proper logging to errors

Added “enable/disable feedback” via maxadmin/telnet
2015-03-05 18:58:07 +01:00
markus456
c2cd3f4c3d Merge pull request #73 from tanji/serversjson
Output server list in JSON format
2015-02-19 16:56:02 +02:00
Guillaume Lefranc
eacd41d5da Use plural for command 2015-02-19 13:57:02 +01:00
Guillaume Lefranc
e047247200 Add command to print all servers in JSON format 2015-02-19 10:07:31 +01:00
VilhoRaatikka
272cd73cad Fix to bug #701, http://bugs.mariadb.com/show_bug.cgi?id=701
debugcmd.c:execute_cmd:added skip counter which adjusts the starting position of next argument correctly thus avoiding cropping the latter quoted argument.
2015-01-19 18:38:46 +02:00
VilhoRaatikka
5d1f029260 New fix candidate to bug #698, http://bugs.mariadb.com/show_bug.cgi?id=698
client/test/maxadmin_test.sh: added new cases for testing maxadmin
service.c:dListListeners:fixed NULL-pointer reference
debugcli.h: replaced magic number 80 with constant integer.
cli.c:execute:fixed command buffer overflow
debugcmd.c:convert_arg:restored return value to 0 in case of error
2015-01-19 17:55:02 +02:00
VilhoRaatikka
1a76d2d06f Fix to bug #698, http://bugs.mariadb.com/show_bug.cgi?id=698
debugcmd.c:convert_arg returned zero if argument is invalid. That zero was cast to pointer. Using it caused NULL-pointer references. Changed the return value indicating about error to 0x1 which is then handled properly.
2015-01-17 01:24:56 +02:00
VilhoRaatikka
f4f537a3e2 Fix to bug #673, http://bugs.skysql.com/show_bug.cgi?id=673
dcb.c:dcb_hashtable_stats:division by zero
hashtable.c:hashtable_get_stats: NULL-pointer reference
service.c:serviceStartPort:set service->users NULL to avoid referring to freed memory
users.c:dcb_usersPrintf: NULL-pointer reference
debugcmd.c:convert_arg: changed return value to 1 in case of error, 0 (==NULL) is valid but it indicates that there are no users loaded.
	execute_cmd: fixed command handling
2014-12-31 21:06:28 +02:00
VilhoRaatikka
8e1e72132b Fix to #645, http://bugs.mariadb.com/show_bug.cgi?id=654
NULL-terminated argument list in case where there are given more arguments than expected.
2014-12-23 18:12:23 +02:00
Markus Makela
2e3fb9cbd3 Changed the 'seslog' command to 'sessionlog' in the telnet client. 2014-11-19 16:55:18 +02:00
Markus Makela
2e456c7348 Changed the order of help messages about seslog command 2014-11-19 15:22:12 +02:00
Mark Riddoch
e67ded72a0 Merge branch 'develop' of https://github.com/mariadb-corporation/MaxScale into develop 2014-11-19 12:07:13 +00:00
Mark Riddoch
d3c8770852 Merge branch 'blr' into develop
Conflicts:
	client/maxadmin.c
	server/core/CMakeLists.txt
	server/core/dcb.c
	server/core/gateway.c
	server/core/poll.c
	server/core/test/CMakeLists.txt
	server/core/test/makefile
	server/include/poll.h
	server/modules/routing/debugcmd.c
2014-11-19 12:00:55 +00:00
Markus Makela
c3439027d4 Fixed a missing session list iteration from debugcmd.c 2014-11-19 13:07:37 +02:00
Markus Makela
2556097a98 Added commands to debugcmd.c that enable and disable logs for a single session.
Added the session id to dprintAllSessions and dprintSession output.
2014-11-19 12:25:33 +02:00
Markus Makela
98390e89cc Added dummy cli commands that would enable and disable session logs. 2014-11-19 09:37:24 +02:00
Mark Riddoch
a16d1d445e Addition of flush log and flush logs command 2014-11-14 18:02:25 +00:00
VilhoRaatikka
9a5168c3e8 Put errors ganerating code behind FAKE_CODE macro, which is not defined by default in any build. 2014-11-10 15:22:08 +02:00
VilhoRaatikka
54d389e329 Fix to Coverity issue 72733 2014-11-01 21:16:03 +02:00
Mark Riddoch
9e0a8a0eee Addition of show eventstats 2014-10-23 13:38:46 +01:00
Mark Riddoch
70672e43a1 Addition of backoff process for master reconnect
Housekeeper task display
2014-10-23 10:46:55 +01:00
Mark Riddoch
e729a17fd4 Addition of new tuning parameters for epoll spins and wait time 2014-10-17 12:28:27 +01:00
Mark Riddoch
f459bdfe04 Add new command to view the event queue
Fixes to fake poll events to improve fairness
2014-10-17 08:36:32 +01:00
Markus Makela
ebb3b52fdb Included the my_config.h header before any system headers if mysql headers were used. 2014-10-10 12:30:21 +03:00
Markus Makela
b0683d9b4d Updated the licensing year from 2013 to 2013-2014 2014-10-01 14:37:12 +03:00