Markus Makela
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
Markus Makela
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
Markus Makela
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
Markus Makela
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
Markus Makela
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
Markus Makela
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
Markus Makela
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
Markus Makela
78b5777d6e
Fixes to Coverity defects
...
Few fixes to possible use of freed memory and resource leaks.
2015-12-15 13:13:53 +02:00
Johan Wikman
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
Markus Makela
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
Markus Makela
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
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
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
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
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
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
680345d374
Whitespace cleanup of config.c
...
- Tabs replaced with spaces.
- Allman indentation style
2015-11-12 16:06:02 +02:00
Markus Makela
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
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
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
Markus Makela
529e697eaf
Updated code based on review of ac308dcb2c34e081f9814ad40c0961a217c86fc4
...
Removed unnecessary spinlock and added more checks.
2015-11-02 12:00:08 +02:00
Markus Makela
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
Johan Wikman
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
Markus Makela
8d6c583a1c
Added a check for duplicate sections in the configuration file.
2015-10-29 16:11:08 +02: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
Markus Makela
bff6db96a1
Same database on more than one server now cause the schemarouter session to be closed.
2015-10-05 10:20:58 +03:00
Markus Makela
638c2250c9
Fixed internal test suite.
2015-09-29 16:36:12 +03:00
Markus Makela
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
Markus Makela
a9fd7926ac
Removed unnecessary strcmp.
2015-09-04 19:34:18 +03:00
Markus Makela
9a3510ab56
Added maxinfo and binlogrouter to the list of "internal routers".
2015-09-04 19:30:14 +03:00
Markus Makela
b66dfaa8ec
Fixed possible error with multi-line parameters.
2015-09-01 21:22:47 +03:00
Markus Makela
77a49e8cbd
Removed magic numbers.
2015-09-01 14:31:35 +03:00
Markus Makela
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
Markus Makela
9d9b7bccfc
Changed to PCRE for processing configuration file parameters.
2015-09-01 14:06:14 +03:00
Markus Makela
e0f95de606
Added commas to multi-line parameters without one.
2015-09-01 14:06:14 +03:00
Markus Makela
50d1675c7b
Moved to realloc instead of always allocating new memory.
2015-09-01 14:06:14 +03:00
Markus Makela
de643df067
All configuration parameters now support multi-line style.
2015-09-01 14:06:14 +03:00
Markus Makela
72097fc30e
Added support for multiline options for routers and filters.
2015-09-01 14:06:14 +03:00
Markus Makela
45227c8875
Changed service permission checks to fail when user doesn't have access rights.
2015-08-28 17:39:45 +03:00
Markus Makela
c5214bea1b
Cleaned up code and changed function structure.
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
0abcf349ff
Partial merge of MXS-70
2015-08-10 17:33:40 +03:00
Markus Makela
e252402edf
Fixed config failure when listener only has a socket and no port.
2015-07-24 12:47:28 +03:00
Markus Makela
b756690123
Merge branch 'release-1.2' into develop
2015-07-15 11:38:27 +03:00
Markus Makela
78eab19c62
Fixed compiler warnings.
2015-07-14 17:13:09 +03:00
counterpoint
3ddbe47f8b
Minor tidy up, including removing obsolete MUTEX_BLOCK.
2015-07-13 14:32:54 +01:00