406 Commits

Author SHA1 Message Date
Esa Korhonen
f2d2202ea3 MXS-2304 Use get_enum() instead of config_get_enum() 2019-02-01 10:29:24 +02:00
Esa Korhonen
c8a84cebd0 MXS-2304 Use get_integer() instead of config_get_integer() 2019-01-31 18:12:25 +02:00
Esa Korhonen
63b5eab89e MXS-2304 Convert configuration management structs to classes
The fields of MXS_CONFIG_PARAMETER remain unchanged so that parameter
processing can be changed gradually.
2019-01-31 17:57:16 +02:00
Markus Mäkelä
3f4c72d4f2
MXS-2303: Fix missing parameter error
The detection of missing parameters that define which module to load must
be done before the module is loaded.
2019-01-31 14:23:27 +02:00
Markus Mäkelä
df9335382d
Fix qc cache memory usage message
A zero value would get printed as -nanYiB.
2019-01-31 14:23:16 +02:00
Johan Wikman
9083ea2d02 MXS-2290 Reject use of whitespace in section names
Whitespace in section names was deprecated in 2.2 and in 2.4 it
will be rejected.
2019-01-28 12:22:28 +02:00
Johan Wikman
5afceb1185 MXS-2274 Reserve names starting with @@ for use by MaxScale
Names starting with '@@' can now longer be used in configuration files.
Subsequent commits will prevent such names from being used when objects
are created dynamically.
2019-01-24 17:42:29 +02:00
Esa Korhonen
f559bf3d95 MXS-2271 Move disk space settings to a settings-container 2019-01-24 09:49:53 +02:00
Esa Korhonen
9ac8bf93bb MXS-2271 Rename monitor-related classes
MXS_MONITOR->Monitor
MonitorInstance->MonitorWorker
MonitorInstanceSimple->MonitorWorkerSimple
2019-01-22 15:59:17 +02:00
Esa Korhonen
3321a591ef MXS-2271 Move some monitor management functions to an internal class
The class MonitorManager contains monitor-related functions that should not
be called from modules. MonitorManager can access private fields and methods
of the monitor.
2019-01-22 10:31:06 +02:00
Esa Korhonen
1c647f3753 MXS-2220 Move most remaining functions inside class
Most of the ones still remaining outside are special cases.
Also, removed locking from status manipulation functions as it
has not been required for quite some time.
2019-01-08 15:15:34 +02:00
Esa Korhonen
d5c78eb31f MXS-2220 Move more server functions inside class 2019-01-08 15:12:47 +02:00
Markus Mäkelä
f0f9c21d1c
Merge branch '2.3' into develop 2019-01-07 10:54:42 +02:00
Markus Mäkelä
0859f3caff
Merge branch '2.2' into 2.3 2019-01-07 10:33:34 +02:00
Markus Mäkelä
87c3b1d25b
MXS-2234: Extend persisted config file log message
The log message should now contain enough information to more easily debug
any configuration issues that result from updating the main config file
after runtime changes have been done.

Also fixed the theoretical race condition in detection of persisted
configuration files by only checking for their existence once.
2019-01-03 12:48:30 +02:00
Esa Korhonen
40485d746c MXS-2220 Change server name to constant string 2019-01-03 12:13:15 +02:00
Markus Mäkelä
050ce7f1a3
MXS-2200: Add runtime handling for all global parameters
All global parameters are now handled by the runtime configuration
modification code. The parameters that are trivial to update can now be
updated at runtime. All other global parameters cause a new error message
to be returned stating that the parameter in question cannot be modified
at runtime.

Also updated the list of modifiable parameters in MaxCtrl. This list
should not be stored in MaxCtrl and should be created by MaxScale at
runtime.
2019-01-03 09:37:59 +02:00
Esa Korhonen
6209d737e9 MXS-2220 server_alloc returns internal type
Also adds default initializers to SERVER fields.
2018-12-14 10:31:57 +02:00
Esa Korhonen
f7822c20e4 MXS-2196: Remove authenticator default value
The authenticator can be chosen by the protocol module if no value is
specified. By having a default parameter, this code would never get
called.
2018-12-11 13:58:00 +02:00
Johan Wikman
c0c9a9858d MXS-2197 Rename maxscale/log.h to maxscale/log.hh
In files either include maxscale/log.hh or remove include entirelly
as maxscale/ccdefs.hh includes it.
2018-12-10 12:58:17 +02:00
Johan Wikman
1b5b789342 MXS-2208 Move trim-functions from maxscale to maxbase
log.h now includes string.hh, which is conceptually wrong, but
log.h will shortly disappear and be superceded by log.hh.
2018-12-10 12:50:07 +02:00
Markus Mäkelä
45827dd433
MXS-2196: Store listener reference in DCB
By storing the reference in the DCB, the two-way dependency between the
listeners and services is severed. Now the services have no direct link to
listeners and after the destruction of a listener it will be freed once
all connections through it have closed.

Due to the fact that a listener itself has a DCB that must point to a
valid listener, a self-reference is stored in the listener DCB. This is
extremely confusing and is only here to keep the code functional until the
DCB part of the listener can be factored out.
2018-12-04 11:50:43 +02:00
Markus Mäkelä
a10b6c2e89
MXS-2196: Take Listener into use 2018-12-04 11:39:52 +02:00
Markus Mäkelä
330719c8f9
MXS-2196: Store listener references in Service
By storing a shared pointer to the listeners in the services, they will be
available as long as the service using them exists. This enables clean
destruction of listeners that still have open sessions.

The listener creation code now separately creates the listener and links
it to the service. Also replaced relevant parts of the related code with
the listener implemented versions of it.
2018-12-04 11:39:52 +02:00
Markus Mäkelä
a6063b5e85
MXS-2196: Remove listen entry point from protocol
The entry point was useless as all of the modules called the same
function.
2018-12-04 11:39:52 +02:00
Markus Mäkelä
bb295b5cbe
MXS-2196: Remove listeners from services
All access to the listeners of a service are done via the listener
functions.
2018-12-04 11:39:51 +02:00
Esa Korhonen
756593a718 MXS-2205 Combine maxscale/router.h with maxscale/router.hh 2018-12-03 15:28:06 +02:00
Esa Korhonen
36792607d8 MXS-2205 Combine internal/modules.h with internal/modules.hh 2018-12-03 13:36:25 +02:00
Esa Korhonen
344c7dde4a MXS-2205 Combine internal monitor headers
Contents of monitor.h moved to monitor.hh
2018-12-03 13:32:09 +02:00
Markus Mäkelä
01e9f71af1
MXS-2197: Make SERV_LISTENER a C++ class
The class is still mostly the same as the old C version but it now uses
std::string instead of char pointers. Changed configuration default values
so that the parameters passed to the listener allocation are always valid.
2018-11-30 12:15:57 +02:00
Markus Mäkelä
77585bdb8c
MXS-2197: Make config.h and service.h C++ headers
This is the first step into converting the other headers into C++.
2018-11-30 12:15:57 +02:00
Markus Mäkelä
cbe1483028
MXS-2167: Add support for extra_port
This allows MaxScale to connect to the server even when max_connections
has been reached.
2018-11-15 14:24:41 +02:00
Markus Mäkelä
37d38593d5
MXS-2100: Treat unknown global parameters as errors
Previously they merely generated warnings.
2018-11-14 16:23:47 +02:00
Markus Mäkelä
f9d18606a8
Remove unused code
The code that required these parameters was not added into 2.3 as it was
not needed.
2018-11-14 16:23:47 +02:00
Markus Mäkelä
7d54df74dc
Hard-code minimum suggestion distance to 4
This way only close matches are suggested.
2018-11-08 12:14:36 +02:00
Johan Wikman
32f2e769f4 MXS-1780 Make retain_last_statements service specific 2018-11-08 12:08:42 +02:00
Markus Mäkelä
a99ab62cb7
MXS-2136: Convert 'passwd' to 'password'
The old 'passwd' parameter is now converted to the 'password' parameter
and a warning about its deprecation is logged. This keeps the mandatory
parameter detection functional while still allowing old-style
configurations to be used.
2018-11-06 15:09:14 +02:00
Markus Mäkelä
f7f6bcea9e
Add parameter name suggestions
If an unknown parameter is detected, a suggestion is now given from the
set of known parameters if they are similar enough.
2018-11-06 15:09:14 +02:00
Esa Korhonen
fe3900be0e MXS-2102 Allow runtime change of disk_space_threshold for monitor
This is currently disallowed for the server parameter, as the value could be
read/written concurrently. The monitor parameter can be changed since the
monitor is stopped during write.
2018-11-06 11:44:50 +02:00
Johan Wikman
a349f0ad0d MXS-1779 Implement the classify REST-API 2018-10-31 10:19:40 +02:00
Johan Wikman
3631388f75 MXS-1779 Add initial support for classification URL
This commit introduces the plumbing support for obtaining
classification information of a statement using the REST-API.
It introduces a URL like

    /v1/maxscale/query_classifier/classify?sql=SELECT+1

that in the response will return a JSON object with the
information. Subsequent commits will provide the actual
information.
2018-10-31 10:19:40 +02:00
Markus Mäkelä
906d8cee5b
Format all files
Formatted all files with uncrustify.
2018-10-31 09:46:02 +02:00
Markus Mäkelä
8d1b26060a
MXS-2109: Change semantics of query_classifier_cache_size
The cache size now refers to the total memory used by the cache instead of
the per thread limit. This makes it easier to use as well as more
predictable by removing the dependency on the number of worker threads.
2018-10-31 09:46:02 +02:00
Markus Mäkelä
06d1189e94
Remove unused and confusing variable
The global version_string variable was never set.
2018-10-31 09:13:07 +02:00
Markus Mäkelä
7deed35587
Merge branch '2.2' into 2.3 2018-10-31 09:03:09 +02:00
Markus Mäkelä
ce35b0d541
Merge branch '2.2' into 2.3 2018-10-30 14:16:33 +02:00
Markus Mäkelä
91c5f8580c
MXS-2119: Fix file permissions
The admin files are now created with 640 permissions and automatically
created directories now properly set the permissions for the group as
well. All files and directories created by avrorouter and binlogrouter
also now correctly limit the read and write permissions only to the owner
and the group.
2018-10-30 12:45:36 +02:00
Markus Mäkelä
4be5d9267d
Fix writeq_high_water and writeq_low_water
The parameters were never read at startup and could not be modified at
runtime. Also the values were only read once at startup.
2018-10-20 11:53:57 +03:00
Markus Mäkelä
0862c724d8
Fix writeq_low_water
The value was never updated. Also amended the documentation to point out
that the parameter accepts size type values.
2018-10-20 11:53:57 +03:00
Markus Mäkelä
7d03bee648
Add type formatting helpers
Created the <maxbase/format.hh> header that contains various helper
functions for formatting values into human readable forms. Currently only
binary to human readable size conversion is implemented.
2018-10-19 11:20:29 +03:00