The help output of all the list and show commands now explains what each
field in the output table means. The generated table will be added at the
end of the help output.
The descriptions table looks like this:
Field Description
----- -----------
Version MaxScale version
Commit MaxScale commit ID
Started At Time when MaxScale was started
Activated At Time when MaxScale left passive mode
Uptime Time MaxScale has been running
Parameters Global MaxScale parameters
The fields are now defined separately and no longer use the object keys as
the names of the values. This makes it clearer as to what the field
definition actually is. Following commits will add a description key into
each object that makes it possible to easily build help output.
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 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 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.
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.