If a monitor was created with an argument that was not a key-value type, a
promise would be rejected outside of the main maxctrl function. Added a
test case that covers this and fixed a few other test coverage problems
that were present.
The new `force=yes` option closes all connections to the server that is
being put into maintenance mode. This will immediately close all open
connections to the server without allowing results to return.
The `start services` and `stop services` command aliases now map to the
same command as `start maxscale` and `stop maxscale`. This should help
alleviate the confusion that the command naming caused.
It is frequently used when using self-signed certificates so making it
shorther makes life easier. Also added the missing --tls-passphrase into
the TLS options group.
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.
'maxctrl list sessions' will now show the connection
time and idleness in addition to the id, user, host
and service of the session. Further, the columns have
be reordered somewhat so that the id, user and host are
shown first, and the service last.
Figure out the console width and adjust output accordingly.
In default mode use '\n' as separator (necessary for making the
session query output sensible) and in tsv mode ','.
Even though directly closing the socket is not very neat in the
architectural sense of things, it allows the best of both worlds: the
socket is instantly closed and is open for reuse while the listener struct
is still available as a reference.
This change needs to be revised when the listeners are refactored into
separate objects.
Updated documentation to reflect the change in behavior.
If a listener is defined in a static configuration file, it can now be
destroyed at runtime. If MaxScale is restarted, the listener will be
created again unless the configuration file is modified.
Instead of using the correct version in in-source builds, a dummy file is
copied in place. This removes the need to explicitly include the
VERSION.cmake file.
The VERSION.cmake file defines which VERSION.cmake file is included. By
changing the file that it points to, the version can be changed without it
affecting other parts of the code that use it.
If a value that is not of key-value format was given to the create
commands, the code previously threw an exception. This causes tests to
misbehave so changing it to a rejected promise is more appropriate.
The configuration used an invalid parameter name which caused the two
MaxScales to use the same directory for persisted configurations.
The test also tried to sync with the wrong server causing the same
listener to be created twice on the same port but on different MaxScales.
Cleaned up the startup and shutdown scripts to always start from a clean
state.
The command naming caused problems when other parts of the service were
being altered. The parser doesn't seem to handle the case of overlapping
commands that well.
Updated test cases with new code and adjusted syntax accordingly.