174 Commits

Author SHA1 Message Date
Markus Mäkelä
cbb8c68770
Remove router_options
Relaced router_options with configuration parameters in the createInstance
router entry point. The same needs to be done for the filter API as barely
any filters use the feature.

Some routers (binlogrouter) still support router_options but using it is
deprecated. This had to be done as their use wasn't deprecated in 2.2.
2018-07-11 14:08:56 +03:00
Markus Mäkelä
b320217212
Remove configuration reloading
Removed the deprecated configuration reloading code. Added a entry into
the release notes that states this and the fact that it was deprecated in
2.2.
2018-07-11 14:08:54 +03:00
Johan Wikman
cc0299aee6 Update change date of 2.3 2018-06-25 10:07:52 +03:00
Markus Mäkelä
bd6155b950
MXS-1914: Resolve symbols at link time
Enabled link time symbol resolution to administrative modules.
2018-06-18 12:58:51 +03:00
Markus Mäkelä
bbeaaa97b5
Merge branch '2.2' into develop 2018-06-13 23:18:52 +03:00
Markus Mäkelä
315738f279
Merge branch '2.1' into 2.2 2018-06-13 23:15:11 +03:00
Markus Mäkelä
53177c30de
Fix runtime listener creation
The number of arguments to createListener was incremented but the maximum
count was not. Also fixed the parameter types for createListener and
alterServer.
2018-06-13 23:13:16 +03:00
Markus Mäkelä
143882ddce
Merge branch '2.1' into 2.2 2018-06-13 21:04:49 +03:00
Markus Mäkelä
1ea7c65861
Fix runtime alteration of servers
The server runtime alteration was broken by commit
c850336199c3c19508a3d280fb7000291d66b80c when it increased the maximum
argument count of the `alter server` command to 14.
2018-06-13 14:29:28 +03:00
Markus Mäkelä
0627e8dc86
Resolve all symbols for routers at link time
The routers should not have undefied references. Exceptions to this are
the modules that use the maxscale_shutdown() function defined in
gateway.cc.
2018-06-12 19:40:34 +03:00
Markus Mäkelä
96ed651466
Merge branch '2.2' into develop 2018-06-11 11:28:36 +03:00
Markus Mäkelä
1a24f0a956
Merge branch '2.1' into 2.2 2018-06-11 10:36:57 +03:00
Markus Mäkelä
1e1734f42e
MXS-1910: Only require ssl_ca_cert for servers
Servers in MaxScale can encrypt the connections without client keys and
certificates. As keys and certificates are no longer required, the CA
certificate must always be initialized.
2018-06-09 00:15:48 +03:00
Markus Mäkelä
0d73530ff3
Merge branch '2.2' into develop 2018-06-08 11:30:55 +03:00
Markus Mäkelä
a7dd2127d6
Merge branch '2.1' into 2.2 2018-06-08 11:21:35 +03:00
Markus Mäkelä
c850336199
MXS-1907: Allow ssl_verify_peer_certificate when creating listener
When a listener is created at runtime or SSL is being enabled for an
already created listener, the ssl_verify_peer_certificate parameter can
now be defined.
2018-06-08 10:11:43 +03:00
Esa Korhonen
c039821467 MXS-1883 Maintenance is now the only user-modifiable bit for a monitored server
The request to turn maintenance off/on is a separate flag, although the actual
status is still contained in the status bitfield.
2018-05-30 10:09:15 +03:00
Esa Korhonen
12035289f4 Remove server authenticator options
Was unused. A warning is printed if the parameter is defined. Any value is ignored.
2018-05-08 14:18:00 +03:00
Johan Wikman
510eb7ec7c MXS-1848 Change monitorCamelCase to monitor_snake_case 2018-05-07 14:08:36 +03:00
Johan Wikman
1f6cc6db8a MXS-1840 Compile all routers as C++
Minimal changes, only what is needed in order to make it compile.
2018-05-07 14:06:22 +03:00
Esa Korhonen
5d010ff712 Cleanup SERVER struct
Removed one unused field. Rearranged others, clarified comments.
2018-04-27 10:48:56 +03:00
Johan Wikman
b36f6faa7e MXS-1754 Reintroduce maxscale::Worker
Worker is now the base class of all workers. It has a message
queue and can be run in a thread of its own, or in the calling
thread. Worker can not be used as such, but a concrete worker
class must be derived from it. Currently there is only one
concrete class RoutingWorker.

There is some overlapping in functionality between Worker and
RoutingWorker, as there is e.g. a need for broadcasting a
message to all routing workers, but not to other workers.

Currently other workers can not be created as the array for
holding the pointers to the workers is exactly as large as
there will be RoutingWorkers. That will be changed so that
the maximum number of threads is hardwired to some ridiculous
value such as 128. That's the first step in the path towards
a situation where the number of worker threads can be changed
at runtime.
2018-04-16 14:53:08 +03:00
Johan Wikman
099b976773 MXS-1646 Remove non-blocking/timed epoll_wait calls
Since a shutdown message will now be sent via the regular epoll route,
there is no need to regularily wake up from epoll in order to check
whether shutdown has been initiated, but we can simply wait in epoll_wait
until told to wake up.
2018-02-05 10:35:14 +02:00
Markus Mäkelä
91fc67b118 Automatically convert maxadmin arguments to new format
As the object name formatting is automated, so should the formatting of
object names in arguments. This also makes 2.2 backwards compatible with
2.1 commands.
2017-12-21 10:48:07 +02:00
Esa Korhonen
508ce3a703 MXS-1491: Failover can be executed manually
Also, renamed config setting "failover" to "auto_failover". Removed
setting "switchover" as it is now always enabled.
2017-12-04 09:41:00 +02:00
Markus Mäkelä
396b81f336 Fix in-source builds
The internal header directory conflicted with in-source builds causing a
build failure. This is fixed by renaming the internal header directory to
something other than maxscale.

The renaming pointed out a few problems in a couple of source files that
appeared to include internal headers when the headers were in fact public
headers.

Fixed maxctrl in-source builds by making the copying of the sources
optional.
2017-11-22 18:40:18 +02:00
Markus Mäkelä
3a78b716b8 Merge branch '2.2' into 2.2-mrm 2017-10-30 11:06:34 +02:00
Johan Wikman
37c804e0d3 MXS-1327 Warn if debug priority enabled in release mode
Turning debug on has no effect if MaxScale has been built in
release mode. A warning will now be displayed to the user if
that is attempted.
2017-10-19 12:56:12 +03:00
Johan Wikman
4aea1b6150 Always return json object from module commands
If a module command returns a json object, it will always be
returned to the caller, irrespective of whether the command
itself succeeded or not.

Otherwise, if the command failed and if the module command has
set an error message, that error message will be returned as a
json object containing the error message.
2017-09-29 13:10:29 +03:00
Johan Wikman
ae3e7a07e2 Always return json object from module commands
If a module command returns a json object, it will always be
returned to the caller, irrespective of whether the command
itself succeeded or not.

Otherwise, if the command failed and if the module command has
set an error message, that error message will be returned as a
json object containing the error message.
2017-09-29 12:06:17 +03:00
Johan Wikman
89d1f81e37 Merge branch '2.2' into 2.2-mrm 2017-09-28 15:19:20 +03:00
Markus Mäkelä
14d8b6a0df Remove MODULECMD_ARG_OUTPUT argument type
Since the module command interface was expanded to include a JSON output
parameter, there is no longer a need for an output DCB. As the JSON can be
printed by both maxadmin and the REST API, this allows the removal of
explicit output formatting in module commands.
2017-09-28 13:59:28 +03:00
Markus Mäkelä
da648387dd Handle failed module commands with no error messages
If a module command fails to execute but no error messages are stored, a
generic error message is logged.
2017-09-28 13:53:40 +03:00
Markus Mäkelä
380482d507 Fix memory leak on module command call
If a module command outputted JSON, the string generated by json_dumps
would leak.
2017-09-28 13:11:49 +03:00
Markus Mäkelä
895d950da0 Format all source files with Astyle
Formatted all source files Astyle.
2017-09-28 07:04:21 +03:00
Markus Mäkelä
4c3d6f6884 MXS-1446: Add execution of dummy failover command
The failover command is simulated by executing a call to /usr/bin/echo
with all possible monitor parameters. This allows testing of the failover
mechanism without actually using the failover command.
2017-09-27 19:44:21 +03:00
Markus Mäkelä
316f792242 MXS-1446: Make failover_timeout configurable
The time that MaxScale waits for a failover is now configurable.
2017-09-27 19:37:41 +03:00
Markus Mäkelä
f20005dddc Add missing parameters to alter monitor
The `script_timeout` and `journal_max_age` parameters weren't handled in
the monitor alteration code.

Also added missing documentation to maxadmin help output for
`alter monitor`.
2017-09-27 19:26:05 +03:00
Markus Mäkelä
2633ad2fe4 Merge branch '2.1' into 2.2 2017-09-26 14:29:14 +03:00
Johan Wikman
df4f3cb302 MXS-1450 Remove leading whitespace
Leading whitespace is removed from a sent maxadmin command
before the command is interpreted.
2017-09-26 13:47:08 +03:00
Johan Wikman
bfe387b73f MXS-1450 Remove manual history, sort includes
Remove manually maintained revision history and sort include
files.
2017-09-26 13:43:59 +03:00
Johan Wikman
02b9e0a01d Merge branch '2.1.7' into develop-2.1-merge 2017-09-12 11:08:02 +03:00
Markus Mäkelä
6cf90ceb15 MXS-1390: Update MaxAdmin documentation
Added the missing documentation for the alteration of
admin_log_auth_failures.
2017-09-11 12:49:11 +03:00
Markus Mäkelä
22ceac6676 Update alter server help text
Added `persistpoolmax` and `persistmaxtime` to the help output of `show
servers`.
2017-09-01 12:06:44 +03:00
Markus Mäkelä
ae5260bec7 MXS-1288: Deprecate reload config
The `reload config` command is now deprecated. The same functionality can
be found in the MaxScale REST API.
2017-08-22 21:15:12 +03:00
Markus Mäkelä
cc8fb995cd MXS-1354: Make new users backwards compatible
The `add user` and `enable account` commands create fully privileged
administrative users like they did in 2.1. This makes the addition of
read-only users backwards compatible.

Updated and expanded the documentation on administrative interface
users. Added entries into the release notes as well as the upgrading
document about relevant changes between 2.1 and 2.2.
2017-08-19 09:27:15 +03:00
Markus Mäkelä
6cc3986db5 MXS-1354: Prevent removal of last admin account
Removing the last admin account is now forbidden. This should prevent most
cases where users could lock themselves out of the administrative
interface.

This change does allow a non-root network user to be the last admin
account. In practice this does not prevent the root user from gaining
access to maxadmin. Access can be gained by removing the users file and
restarting MaxScale or by editing the users file by hand.
2017-08-18 10:28:21 +03:00
Markus Mäkelä
828649ba99 MXS-1354: Add user authorization to maxadmin
All commands that modify the internal state of MaxScale now require admin
level authorization.
2017-08-18 10:28:21 +03:00
Markus Mäkelä
9f81f0775f MXS-1354: Rename user account type enum
Renamed the enum and its values.
2017-08-18 10:28:21 +03:00
Markus Mäkelä
9d24a63c10 MXS-1354: Add user account types to REST API
The user accounts can now be created with a specific account type. This
allows read-only users to be created for the REST API.
2017-08-18 10:28:21 +03:00