4386 Commits

Author SHA1 Message Date
Johan Wikman
6613723a1f Update error message when startup fails
Claiming that the loading of maxscale.cnf failed in case of any
error was misleading. Maxscale may not succeed in opening it,
reading it or processing it.
2015-11-19 09:28:14 +02:00
Johan Wikman
0345f3622d LOGIF and skygw_log_write removed.
All places where LOGIF and skygw_log_write were used have been
updated to use the new logging macros instead. Consequently,
they can now be removed.
2015-11-19 09:26:27 +02:00
Johan Wikman
ee7793312b Broken error message fixed in readwritesplit.c
When converting the skygw_ logging calls to MXS_ equivalents,
some part of the error message got lost.
2015-11-18 20:51:11 +02:00
Johan Wikman
3e3770fa82 ss_dassert() no longer uses skygw_log_write.
Use of skygw_log_write() in ss_dassert and ss_info_dassert replaced
with the use of MXS_ERROR(). In addition, ss_dassert and ss_info_dassert
are now expressions that require a trailing ;.
2015-11-18 14:56:08 +02:00
Markus Makela
cbeead7c43 Formatted namedserverfilter
Namedserverfilter formatted according to the style guide.
2015-11-18 14:44:05 +02:00
Markus Makela
036fd6f16c Formatted qlafilter
Qlafilter formatted according to the style guide.
2015-11-18 14:31:02 +02:00
Markus Makela
a7c0952e66 Formatted tee filter
Tee filter formatted according to the style guide.
2015-11-18 14:18:00 +02:00
Markus Makela
e24504c427 Formatted topfilter
Topfilter is now formatted according to the style guide.
2015-11-18 13:46:23 +02:00
Markus Makela
7d9324ee12 Formatted regexfilter
Formatted regexfilter according to the style guide and removed trailing whitespace.
2015-11-18 13:35:04 +02:00
Johan Wikman
3f8739ebfd LOGIFs removed from binlog test. 2015-11-18 13:23:16 +02:00
Johan Wikman
afdeb6fa5b binlogrouter: All LOGIFs and skygw_log_writes replaced.
All LOGIFs and skygw_log_writes replaced with the equivalent
MXS_[ERROR|WARNING|NOTICE|INFO|DEBUG] macros.
2015-11-18 12:35:21 +02:00
Johan Wikman
d59c6a3570 readwritesplit: skygw_log_writes replaced. 2015-11-18 12:28:40 +02:00
Markus Makela
eb0cf745ca Filters not being found is now an error instead of a warning.
The log message was labeled as a warning instead of an error and finding out
the real reason why MaxScale didn't start when a filter wasn't found was difficult.
2015-11-18 11:50:35 +02:00
Markus Makela
da74bb7c3f Formatted dbfwfilter according to the style guide
Fixed indentation, bracket alignment and other minor things.
2015-11-18 10:12:04 +02:00
Markus Makela
86db0f8754 Fixed event names being truncated
A buffer was allocated for strlen(event) characters leading to the
name always being truncated by one character. The use of a buffer was
unnecessary and was fixed by using the mon_get_event_name function directly.
2015-11-18 04:35:03 +02:00
MassimilianoPinto
521165d20a Documentation update
Documentation update
2015-11-17 15:29:15 +01:00
MassimilianoPinto
ab737dc849 Documentation update
Documentation update with new option: send_slave_heartbeat
2015-11-17 15:26:50 +01:00
Johan Wikman
0413c957f8 LOGIFs removed from schemarouters. 2015-11-17 14:18:51 +02:00
Markus Makela
069297f47e Added BUILD_MMMON to CMake cache. 2015-11-17 14:16:32 +02:00
Markus Makela
1b21cd8609 Fixed extra )) in mmmon. 2015-11-17 14:09:44 +02:00
Johan Wikman
df7b4829d4 server/modules/monitor LOGIFs and skygw_write_logs removed.
All LOGIFs and skygw_log_writes replaced with MXS_[ERROR|
WARNING|NOTICE|INFO|DEBUG] macros.
2015-11-17 13:09:21 +02:00
Johan Wikman
1de202ca20 LOGIF removed from readwritesplit 2015-11-17 12:51:08 +02:00
Johan Wikman
1b8719ffed LOGIF removed from maxinfo. 2015-11-17 12:50:15 +02:00
Johan Wikman
fb443a9f92 LOGIF removed from readconnroute.c 2015-11-17 12:48:47 +02:00
Markus Makela
41d26b5b73 Failure to load filters is now a configuration error
When a filter module is not found or the instance creation fails, this is considered
a fatal error and MaxScale will not start. If a failure occurs when the configuration
is being reloaded, the service will not use filters and an error will be logged.
2015-11-17 12:04:47 +02:00
Johan Wikman
9c7118eb9a GaleraHACRoute.c removed. 2015-11-17 09:52:27 +02:00
Johan Wikman
ac358af7a6 LOGIF and skygw_log_write removed from cli.c and debugcli.c 2015-11-17 09:21:47 +02:00
Johan Wikman
453055a6c0 server/modules/protocol: All LOGIFs and skygw_log_writes replaced.
LOGIFs and skygw_log_writes replaced with the equivalent
MXS_[ERROR|WARNING|NOTICE|INFO|DEBUG] macros.
2015-11-17 09:21:47 +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
Markus Makela
b828b04c05 Fixed debug assertion. 2015-11-17 09:17:29 +02:00
Markus Makela
074f37e997 Fixed crash when filters fail to load
The number of filters wasn't decreased if a filter failed to load resulting
in a crash when the filters were applied.
2015-11-17 03:04:23 +02:00
Markus Makela
5d4fe65b19 Fixed some misaligned brackets. 2015-11-16 21:00:22 +02:00
Markus Makela
6846b0b6b6 Mmmon formatting changes
Fixed indentation, bracket alignment and other minor things.
2015-11-16 20:56:39 +02:00
Markus Makela
797d9dc03d Ndbclustermon formatting changes
Fixed indentation, bracket alignment and other minor things.
2015-11-16 20:56:39 +02:00
Johan Wikman
1bfe85099f server/module/filters: All LOGIF and skygw_log_write calls removed.
All LOGIF and skygw_log_write calls have been replaced with the
equivalent MXS_[ERROR|WARNING|NOTICE|INFO|DEBUG] calls.
2015-11-16 14:25:02 +02:00
Markus Makela
a7e2bf09c8 Cleaned up monitor headers
Formatted all monitor headers according to the coding style.
2015-11-16 14:00:22 +02:00
Markus Makela
65e2b50f96 Removed client hangup error message
The error message did not provide any useful information and was most of the
time a false positive due to EPOLL_RDHUP events calling the hangup function
of the DCB.
2015-11-16 13:59:47 +02:00
Markus Makela
b22d40b06b Fixed PCRE2 beng built when CMake is configured
The bundled PCRE2 library will be built as a separate target and configuring
CMake no longer builds it. Instead, it will only be built when it is out of date.
This requires all targets to declare that they depend on the pcre2 target in
order for it to be built.
2015-11-16 13:59:47 +02:00
Markus Makela
f9c99761d6 Monitor_common formatting changes
Cleaned up monitor_common.c and monitor_common.h
2015-11-16 13:59:47 +02:00
Markus Makela
6dea82631d Galeramon formatting changes
Fixed indentation, bracket alignment and other minor things.
2015-11-16 13:59:47 +02:00
Markus Makela
f3a4bedbf5 Mysqlmon formatting changes
Fixed indentation, bracket alignment and other minor things.
2015-11-16 13:59:47 +02:00
Johan Wikman
1bd16db593 query_classifier: LOGIF and skygw_log_write replaced.
The use of LOgIF and skygw_log_write replaced with the equivalent
MXS_[ERROR|WARNING|NOTICE|INFO|DEBUG] macros.
2015-11-16 13:42:37 +02:00
Markus Makela
40dc49c887 Filters are now loaded and created at startup
Previously filter instances were created when the first session was made. This
caused filter configuration errors to be noticed only after MaxScale was successfully
started. Now filters are loaded and the instance is created when a service applies its filters.
2015-11-16 13:31:33 +02:00
Markus Makela
ab6dae897d Removed unnecessary locking when modifying server status
Server lock was used when the server status was modified even though only
one thread should ever be modifying the server status.
2015-11-16 13:02:17 +02:00
Johan Wikman
a355e1beef Printf format checking added to logging function.
Printf format checking added to logging function and all
issues that were revealed by that fixed.
2015-11-16 12:40:49 +02:00
Johan Wikman
44df53d846 LOGIF and skygw_write_log removed from server/core/*.c
LOGIF and skygw_write_log removed from server/core/*.c and
replaced with calls to MXS_(ERROR|WARNING|NOTICE|INFO|DEBUG).
This is a mechanism change, no updating of the actual message
has been performed.

Currently this causes a very small performance hit, since the
check whether the priority is enabled or not is performed in
the function that is called and not before the function is called.
Once all LOGIFs and skygw_write_logs have been replaced, the
behaviour will be altered back to what it was.
2015-11-16 09:49:12 +02:00
Markus Makela
1f15843d61 Refactored schemarouter to use the resultset.h data types and functions
The generated responses to SHOW DATABASES are now generated by using the resultset.h
data types and functions.
2015-11-16 08:39:49 +02:00
Johan Wikman
b8fda016c9 Log: Some cleanup.
Stuff that does not need to be in the header moved to the
implementation file.
2015-11-15 19:43:45 +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
Johan Wikman
2dcdab29b6 LOGIF_MAYBE macros cleaned away.
Used in few places and only obscured what was going on.
2015-11-14 22:28:17 +02:00