174 Commits

Author SHA1 Message Date
Markus Mäkelä
14890cb232
Merge branch '2.2' into 2.3 2019-03-15 12:26:59 +02:00
Markus Mäkelä
e2ac52826a
MXS-2375: Provide aliases for [start|stop] maxscale
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.
2019-03-13 13:40:37 +02:00
Markus Mäkelä
3081bfbb1e
Merge branch '2.2' into 2.3 2019-03-11 10:49:06 +02:00
Markus Mäkelä
160b4e6e05
MXS-2368: Fix reading of non-tty input
The password input only worked if stdin was a TTY. This was caused by the
fact that the readline-sync library only worked for TTYs.
2019-03-11 10:47:43 +02:00
Markus Mäkelä
af33d19703
Add short version of --tls-verify-server-cert
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.
2019-03-04 10:13:06 +02:00
Markus Mäkelä
14557c7455
MXS-2357: Explain runtime changes in alter service
The help output now states that a subset of the routers support runtime
configuration changes to all parameters.
2019-03-04 08:53:12 +02:00
Markus Mäkelä
49c6244245
Update MaxCtrl and REST API dependencies 2019-02-13 13:54:56 +02:00
Markus Mäkelä
946ffbb40d
Merge branch '2.2' into 2.3 2019-02-08 10:23:47 +02:00
Markus Mäkelä
1be845c438
MXS-2322: Fix maxctrl authentication
The username and password are now explicitly passed to request instead of
being added into the URI manually.
2019-02-08 10:01:48 +02:00
Markus Mäkelä
b0c2dc78af
MXS-2305: Show Linux users in list users
The linux users were missing from the `list users` output.
2019-01-31 14:23:27 +02:00
Markus Mäkelä
d3c7e4e23f
Update MaxCtrl packages
A library required the globby library but the version it required didn't
work. Also updated lodash and inquirer.
2019-01-10 11:23:13 +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
Johan Wikman
f03c5e0fef MXS-2077 Expand 'maxctrl list sessions' somewhat
'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.
2018-11-14 09:52:15 +02:00
Johan Wikman
1ca03fb85c MXS-1780 Show last queries of session
'maxctrl show sessions' now show last queries of session, if
the retaining of statements has been enabled.
2018-11-08 12:08:42 +02:00
Johan Wikman
99bd621874 MXS-1780 Adjust maxctrl output according to console width
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 ','.
2018-11-08 12:08:42 +02:00
Johan Wikman
32f2e769f4 MXS-1780 Make retain_last_statements service specific 2018-11-08 12:08:42 +02:00
Johan Wikman
a7eddfc6b4 MXS-1779 Expand classify help output 2018-10-31 10:19:40 +02:00
Johan Wikman
3b4fa6bd56 MXS-1779 Add maxctrl classify command
Using the REST-API /v1/maxscale/query_classifier/classify?sql=...
the provided statement is sent to MaxScale for classification.
2018-10-31 10:19:40 +02:00
Markus Mäkelä
460d134e73
Add maxctrl internal function documentation
Some of the functions weren't documented and did not explain what they
should be used for.
2018-10-31 09:53:50 +02:00
Markus Mäkelä
cd92b6d4d7
MXS-2122: Close listener socket on destruction
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.
2018-10-31 09:53:50 +02:00
Markus Mäkelä
47d2898818
MXS-2121: Allow destruction of static listeners
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.
2018-10-31 09:53:49 +02:00
Markus Mäkelä
e73301ad71
Update NPM packages
Updated packages for MaxCtrl and the REST API tests.
2018-09-26 11:08:24 +03:00
Markus Mäkelä
40c4614ed1
Update mocha
Updated mocha to latest version for maxctrl and REST API test suites.
2018-09-19 20:32:39 +03:00
Markus Mäkelä
7ec2f77708
Merge branch '2.2' into develop 2018-09-12 23:18:08 +03:00
Markus Mäkelä
643480240c
Simplify MaxCtrl version extraction
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.
2018-09-12 22:09:37 +03:00
Esa Korhonen
fd176c4122 Merge branch '2.2' into develop 2018-09-11 12:57:19 +03:00
Markus Mäkelä
31f6d49ddb
Add symbolic VERSION 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.
2018-09-10 15:11:18 +03:00
Markus Mäkelä
d16fbd4cdf
Expand list users output in maxctrl
The output now lists the type and privileges of each user.
2018-09-10 11:21:06 +03:00
Markus Mäkelä
8cfc966561
MXS-1929: Update unit tests with monitor changes
The user is a mandatory parameter and needs to be passed when a monitor is
created.
2018-08-23 15:46:47 +03:00
Markus Mäkelä
befb25a14a
MXS-1929: Add parameters to maxctrl create monitor
The parameters for the monitor can now be defined when the monitor is
created. This makes the filter, monitor and service creation consistent.
2018-08-23 15:46:46 +03:00
Markus Mäkelä
73401837fd
Skip interactive mode in tests
The automated tests aren't currently suited for testing it.
2018-08-22 16:43:17 +03:00
Markus Mäkelä
fc7436c52a
Add interactive mode to MaxCtrl
If no command is given, MaxCtrl is started in an interactive mode.
2018-08-22 16:40:36 +03:00
Markus Mäkelä
d428292ec0
Add workaround to building tests without all dependencies
The system tests can be build even if not all of the dependencies for
MaxScale are met.
2018-08-20 13:56:58 +03:00
Markus Mäkelä
57471c7baa
Improve MaxCtrl test coverage
A few missing cases that simple to solve were reported by the coverage
tool.
2018-08-13 10:28:03 +03:00
Markus Mäkelä
3bbf58ad1f
Update MaxCtrl packages
Updated needed and pruned unneeded dependencies from maxctrl. Also updated
the packages in the REST API test suite.
2018-08-13 10:28:03 +03:00
Markus Mäkelä
4fc6b43fb3
Update pkg version
Using the newer version removes the deprecation warnings for some of the
packages.
2018-08-13 10:28:01 +03:00
Markus Mäkelä
390c749d4a
Test runtime size validation
Added tests into the MaxCtrl test suite that confirm size types are
properly handled.
2018-08-10 09:50:56 +03:00
Markus Mäkelä
f6cd8b6454
Fill the gaps in MaxCtrl testing
The MaxCtrl test suite now covers most of the code that can be tested
within reasonable limits. Also removed some dead code in `list servers`.
2018-08-09 12:56:53 +03:00
Markus Mäkelä
50c20e79ee
MXS-1929: Reject promise on invalid input
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.
2018-08-09 12:56:52 +03:00
Markus Mäkelä
ccdf1c5679
Improve MaxCtrl test coverage
Added tests that cover areas that weren't tested before.
2018-08-09 12:56:51 +03:00
Markus Mäkelä
1447ac2eb9
Fix MaxCtrl cluster tests
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.
2018-08-09 12:56:51 +03:00
Markus Mäkelä
679ab6a0e9
Remove printing to console in test
The test case, for whatever reason, printed data to the console.
2018-08-09 12:56:49 +03:00
Markus Mäkelä
f3a64f0b56
MXS-1929: Rename alter service filters
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.
2018-08-09 12:54:16 +03:00
Markus Mäkelä
25bc385db2
MXS-1929: Check presence of filter parameters
The parameters were made optional as not all filters require parameters.
2018-08-09 12:54:10 +03:00
Johan Wikman
cf4521503f MXS-2000 Add 'show thread[s]' to maxctrl
Show thread[s] shows detailed information about threads.
2018-08-09 08:35:57 +03:00
Johan Wikman
515cc3231c MXS-2000 Introduce 'maxctrl list threads'
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.
2018-08-09 08:35:57 +03:00
Markus Mäkelä
6c6567cce7
MXS-1929: Add alter service filters MaxCtrl command
The command sets the active set of filters for a service. This allows
modifications to the filter list at runtime via MaxCtrl.
2018-08-06 21:20:29 +03:00
Markus Mäkelä
8cb3a85afd
MXS-1929: Fix MaxCtrl errors
The filter parameters were a mandatory argument even for filters that
don't need parameters. Also fixed the usage information.
2018-08-06 21:20:29 +03:00
Markus Mäkelä
5de91e737d
MXS-1929: Extend create/destroy MaxCtrl tests
Added creation and destruction tests for services and filters. They don't
cover the assignment of filters to services as that is not yet
implemented.
2018-07-31 09:41:10 +03:00
Markus Mäkelä
3f338c8672
MXS-1929: Add create/destroy filter commands
Added the creation and destruction commands for filters to MaxCtrl.
2018-07-31 09:41:10 +03:00