240 Commits

Author SHA1 Message Date
Markus Makela
1fc27b39af MXS-662: Service protocol check no longer ignores bind
The address of a listener was ignored when service protocols were compared.
2016-04-14 19:04:54 +03:00
Markus Makela
f18e5460c4 Removed unused service SSL functions
These have been made obsolete by the introduction of listener.c
2016-03-08 15:41:25 +02:00
Markus Makela
9dc55735e7 Missing listeners are treated as warnings instead of errors
Missing listeners are no longer a cause for shutdown.
2016-03-04 10:58:12 +02:00
Markus Makela
d3da98b58f Merge branch 'MXS-544' into develop-MXS-544-merge 2016-03-03 21:39:39 +02:00
Markus Makela
cb8ea84853 No errors were logged when a service has no listeners
The starting of a service without listeners would fail but there wouldn't be
any log messages about the reason of the failure. In addition to this, MaxScale
would try to restart the service periodically which would lead to unnecessary
error messages.

With this change, missing listeners for services are considered configuration
errors.
2016-03-03 15:57:08 +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
Markus Makela
bf24f18805 Merge branch 'develop' into MXS-544 2016-02-29 10:40:33 +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
counterpoint
5077933e41 Fix bug in mysql_client.c (over optimisation of protocol setting); various clarifications and improvements re code review. 2016-02-22 11:05:02 +00:00
Markus Makela
cfefc046e9 Merge branch 'release-1.3.0' into develop 2016-02-11 10:23:00 +02:00
counterpoint
8367d93746 Migrate SSL functionality out of service and into listener. Develop config handling accordingly, including making provision for SSL parameters in servers for future use in implementing SSL to backend servers. Some elements still to be tidied mainly in mysql_client.c - but that will be part of detaching the SSL authentication from the MySQL protocol. 2016-01-27 15:46:19 +00:00
counterpoint
e58148356d Split off listener functionality and move SSL initiation from service to listener. Put GWPROTOCOL in its own header file. 2016-01-26 16:08:02 +00:00
Markus Makela
b470ebe732 Disabled connection_timeout because it's unsafe to use
The current implementation of the session timeout functionality is not safe to
use. Added a warning to the documentation and disabled the code. If the user
tries to use it, a warning is logged.
2016-01-19 15:29:01 +02:00
Markus Makela
c2310327fc Fixed idle session processing
The current implementation of idle connection timeouts is not safe. The sessions
are handled in a way which is not thread-safe and the checking is done from
a non-polling thread.

With this change, the checks for the session timeouts are done in one of the
polling threads in a thread-safe manner only if at least one service has enabled
the timing out of idle client connections.
2016-01-19 10:53:55 +02:00
Markus Makela
1656840417 Added missing freeing of service resources
The service resources weren't freed when the service is freed.
2016-01-15 16:23:41 +02:00
Johan Wikman
8601068dc2 Reindent server/core/service.c 2015-11-30 21:25:10 +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
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
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
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
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
8d0bd8150a Merge branch 'MXS-329-develop-20151111' into develop 2015-11-13 17:26:34 +02:00
Markus Makela
0b2e00118a Added missing initialization
The service->protocol->listener was never initialized in serviceAddProtocol
and caused a crash if the listener was not started.
2015-11-13 16:38:22 +02:00
Markus Makela
6b88b6b17f Merge branch 'develop' into MXS-329-develop-20151111 2015-11-13 07:48:59 +02:00
Markus Makela
264944ff23 Service users are set to NULL after they are freed. 2015-11-11 18:02:01 +02: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
Johan Wikman
834a88aeda Log variables moved to log_manager.h
The log manager variables lm_enabled_log_files_bitmask, log_ses_count
and tls_log_info that earlier were declared separately in every
c-file are now declared in the log_manager.h header.
2015-11-04 14:26:53 +02:00
Markus Makela
d57b4cd531 Fix to MXS-54: https://mariadb.atlassian.net/browse/MXS-54
Added a new configuration parameter that allows the user to control
whether authentication warning messages are logged.
2015-11-04 09:18:20 +02:00
Markus Makela
cab5e58045 Fixed SSL initialization for services failing. 2015-10-29 16:39:38 +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
Markus Makela
897907b202 Fix to MXS-352: https://mariadb.atlassian.net/browse/MXS-352
If a service fails, MaxScale will try to start it again later on.
2015-10-07 15:35:12 +03:00
counterpoint
cfeaf7d6e9 Merge remote-tracking branch 'origin/develop' into MXS-329
Conflicts:
	server/core/session.c
2015-09-10 13:07:27 +01: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
Markus Makela
00a3d7eb56 Made service permission checks less strict. 2015-08-28 17:33:05 +03:00
Markus Makela
3a901bfea7 Added automatic configuration of localhost_match_wildcard_host. 2015-08-28 14:55:40 +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
4da9045da4 Removed redundant function. 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
3e863863dd Fixes to Coverity defects. 2015-08-26 09:35:10 +03:00
counterpoint
37ac158791 Changes to try to eliminate setting dcb->session to NULL with risk of crashing system. 2015-08-24 12:12:43 +01:00
Martin Brampton
1baf693b02 First changes for lazy session creation. 2015-08-23 16:39:08 +01:00
Markus Makela
dcd82d3a33 Fixed errors and added logging. 2015-07-24 12:19:22 +03:00
Markus Makela
90b20a7459 Converted dcb_free calls to dcb_close in service.c. 2015-07-24 12:06:30 +03:00
Markus Makela
b756690123 Merge branch 'release-1.2' into develop 2015-07-15 11:38:27 +03:00
Markus Makela
a1801237a8 Fixed error messages being printed for existing directories. 2015-07-13 19:35:38 +03:00
counterpoint
ba417ef633 Merge remote-tracking branch 'origin/develop' into MXS-122
Conflicts:
	server/core/dcb.c
2015-07-08 14:54:22 +01:00
Markus Makela
5b75443744 Fixed module load failure referring to lib/maxscale/modules instead of lib/maxscale. 2015-07-04 09:07:37 +03:00
Markus Makela
7e704d2312 Fixed module load failure referring to lib/maxscale/modules instead of lib/maxscale. 2015-07-04 07:13:14 +03:00
Markus Makela
cff01cad05 Fixed compile errors with old SSL library. 2015-06-25 17:13:10 +03:00