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.
Basically the same as the existing 'show threads', with a bit
shorter names. The current 'show threads' will be changed to
resemble the other 'show' commands, that is, the output is a
list of detailed information of each object.
If an invalid value or type is given to the REST API, having the expected
type as well as the given type make problem resolution easier.
Also added a value check into MaxCtrl for listener ports.
Added commands for creating and destroying services. The create command
allows server and filter relationships to be defined but they are not yet
processed by MaxScale. This will be done once the use of filters is made
dynamic.
When MaxCtrl is being built, the source is copied into the build directory
to prevent polluting the source tree with node_modules. This means that
any relative references MaxCtrl builds make outside of the maxctrl
directory must be copied to the build directory.
Displaying the MaxScale version helps identify which package the
executable was bundled with. As the MaxCtrl source is a part of MaxScale,
there's no need for separate versioning.
If only one server is used, the amount of requests can be reduced from a
minimum of two to a minimum of one. In most cases this cuts down the
response time in half.
The `drain server` commands removes a server from all services and waits
until all the connections for it are closed. Once the server is no longer
in use, it will be set into maintenance mode and put back into the
services where it was removed from.
The `show sessions` output now displays the servers each session is
connected to along with their connections IDs. The output format of the
data is not the most compact representation but it should make it
relatively easy to parse.