Commit Graph

273 Commits

Author SHA1 Message Date
2a35312022 Cleaned up the usage of the connector library
The monitor permission checks didn't use the standard connection timeouts but
used hard-coded values. The config.c tried to connect to the embedded library
but since it is not used by it anymore, it always fails.
2016-03-02 21:27:34 +02:00
9b2748f50c Removed false warnings about readwritesplit parameter types
The warning was expecting the wrong return value and mistakenly interpreted that
the setting of the parameter failed.
2016-03-02 21:27:34 +02:00
bf24f18805 Merge branch 'develop' into MXS-544 2016-02-29 10:40:33 +02:00
b5b27740e3 Fixed wrong comparison being made when setting readwritesplit parameters
The comparison was done with strcmp but it was expected to return true on
success when in reality it returns 0 on success.
2016-02-26 18:06:46 +02:00
13387485f6 Added 'auth_all_servers' to service parameters if it is defined
The schemarouter checks if the service has this parameter and if it
is not there, it is automatically enabled. The parameter was not
added as a qualified service parameter so the router couldn't see
the parameter as defined even if it was.
2016-02-25 09:32:04 +02:00
417380ab83 Added missing use_priority to list of valid parameters
This caused Galera node priority usage to always fail.
2016-02-23 14:48:55 +02:00
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
8e010d2367 Fixed wrong comparison being made when setting readwritesplit parameters
The comparison was done with strcmp but it was expected to return true on
success when in reality it returns 0 on success.
2016-02-22 11:05:34 +02:00
fec1ebe925 Removed restrictions on monitor timeouts
The monitor timeouts can now be larger than the monitor interval. This will
allow the combination of low monitoring intervals and large network timeouts.
If a network experiences some periodic lag, it is desirable to allow large
timeout values.
2016-02-19 09:57:15 +02:00
866e91c088 Changes to improve robustness of SSL processing, separate it so far as possible from protocols. Separate the detailed mechanism of authentication from the MySQL protocol with a view to making it into a module later. 2016-02-15 09:29:07 +00:00
2bbe1b068a Allow the query classifier to be specified in maxscale.cnf 2016-02-01 20:44:36 +02:00
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
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
872d02db3e Finalized configuration processing cleanup
All parts of the configuration processing are now in their own functions.
This allows new objects to be created after MaxScale has started.
2016-01-20 09:25:03 +02:00
508c91be32 Cleaned up monitor configuration processing
Moved the monitor configuration processing into its own function and cleaned
it up.
2016-01-19 14:23:44 +02:00
53ac88a1a1 Cleaned up the process of adding filters and servers to a service
Moved the adding of filters, servers and router options to its own function.
2016-01-19 14:23:44 +02:00
0aaba891a3 Cleaned up server configuration processing
Moved the creation of new servers into a separate function and cleaned up
the configuration processing.
2016-01-19 14:23:44 +02:00
c6dfcb66f5 Cleaned up service configuration processing
Moved the allocation and configuration of services into their own function.
Moved SSL parameter validation into a separate function.
2016-01-19 14:23:44 +02:00
2b6b8f87db Fix to MXS-183: Fixed wrong pointer being used for logging error message
The wrong pointer was used when logging an error message about a bad parameter.
2015-12-23 12:46:08 +02:00
8d969aadd1 Changed default number of threads and added auto value.
Changed default number of threads to 1 instead of autoconfigured value and
added a new `auto` variable which enables autoconfiguration of thread count.

The number of threads used when autoconfiguratio fails was changed from 4 to 1.

The default value of using N threads where N is the number of CPU cores was
not optimal as the possibility of rescheduling was higher the more utility
threads there were. Due to this, N-1 is deemed to be the better autoconfigured
value for thread count.
2015-12-15 15:08:43 +02:00
78b5777d6e Fixes to Coverity defects
Few fixes to possible use of freed memory and resource leaks.
2015-12-15 13:13:53 +02:00
edb3f3efd5 Fix coverity report of config.c
If pointer uninitialized there can be free of unallocated memory.
2015-12-08 10:28:31 +02:00
37f8374a10 Fixed multiline configuration processing
The regular expression used when cleaning multiline configuration parameters
didn't match trailing backslash characters in pathnames. This caused them to be
added to the next line causing a possible error.
2015-11-21 15:21:23 +02:00
47e2e4d3e0 Configuration parameters were uninitialized
The creation of a CONFIG_PARAM didn't initialize the qdf_param_type value which
was later used when adding parameters to the monitors.
2015-11-21 03:44:06 +02:00
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
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
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
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
b0c48c3f66 Updated config.c to use PCRE2
config.c now uses PCRE2 to clean up parameter values.
2015-11-13 16:44:23 +02:00
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
680345d374 Whitespace cleanup of config.c
- Tabs replaced with spaces.
- Allman indentation style
2015-11-12 16:06:02 +02:00
cd6f7ce046 Fix to MXS-447: https://mariadb.atlassian.net/browse/MXS-447
Monitors are now started after they have been fully configured.
2015-11-11 17:54:41 +02:00
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
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
0d8faa6840 Invalid thread argument now results in shutdown.
This is done to avoid situations where the loaded configuration doesn't
match the contents of maxscale.cnf.
2015-11-02 12:00:08 +02:00
529e697eaf Updated code based on review of ac308dcb2c34e081f9814ad40c0961a217c86fc4
Removed unnecessary spinlock and added more checks.
2015-11-02 12:00:08 +02:00
6810ed15dd Fix to MXS-436: https://mariadb.atlassian.net/browse/MXS-436
Added autodetection of processor cores and used it as the default if an
invalid value is used for threads.
2015-11-02 12:00:08 +02:00
1f22e2854b maxscale_getline moved to config.c
As a general purpose function should be somewhere else, but we
need to sort out what should be where first.
2015-10-30 09:38:40 +02:00
8d6c583a1c Added a check for duplicate sections in the configuration file. 2015-10-29 16:11:08 +02:00
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
bff6db96a1 Same database on more than one server now cause the schemarouter session to be closed. 2015-10-05 10:20:58 +03:00
638c2250c9 Fixed internal test suite. 2015-09-29 16:36:12 +03:00
5350a85e2b Fix to MXS-356: https://mariadb.atlassian.net/browse/MXS-356
Added configurable timeouts for the embedded MySQL connections.
2015-09-08 11:23:35 +03:00
a9fd7926ac Removed unnecessary strcmp. 2015-09-04 19:34:18 +03:00
9a3510ab56 Added maxinfo and binlogrouter to the list of "internal routers". 2015-09-04 19:30:14 +03:00
b66dfaa8ec Fixed possible error with multi-line parameters. 2015-09-01 21:22:47 +03:00
77a49e8cbd Removed magic numbers. 2015-09-01 14:31:35 +03:00
386fa78a30 Fix to MXS-342: https://mariadb.atlassian.net/browse/MXS-342
Added more error messaging when the parsing of the configuration file fails.
2015-09-01 14:31:35 +03:00
9d9b7bccfc Changed to PCRE for processing configuration file parameters. 2015-09-01 14:06:14 +03:00
e0f95de606 Added commas to multi-line parameters without one. 2015-09-01 14:06:14 +03:00