Commit Graph

151 Commits

Author SHA1 Message Date
7ec2f77708 Merge branch '2.2' into develop 2018-09-12 23:18:08 +03:00
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
fd176c4122 Merge branch '2.2' into develop 2018-09-11 12:57:19 +03:00
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
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
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
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
73401837fd Skip interactive mode in tests
The automated tests aren't currently suited for testing it.
2018-08-22 16:43:17 +03:00
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
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
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
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
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
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
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
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
ccdf1c5679 Improve MaxCtrl test coverage
Added tests that cover areas that weren't tested before.
2018-08-09 12:56:51 +03:00
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
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
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
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
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
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
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
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
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
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
fb3101f7c4 MXS-1929: Improve JSON type error messages
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.
2018-07-31 09:41:10 +03:00
9e9f0b5959 MXS-1929: Fix typo in maxctrl help output
Also split the sentence to make it clearer to read.
2018-07-31 09:41:09 +03:00
146fe76c7a MXS-1929: Add create/destroy service MaxCtrl commands
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.
2018-07-31 09:41:07 +03:00
6c59da77fb Merge branch '2.2' into develop 2018-07-26 11:27:09 +03:00
d68f20b75b Also copy version files for MaxCtrl builds
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.
2018-07-24 09:51:46 +03:00
8d9ccce2dd Fix in-source build of MaxCtrl
The npm install command must generate the version.js file in order for the
in-source builds to work.
2018-07-17 13:05:52 +03:00
f1905d33b1 Fix MaxCtrl list servers test
The test did not expect GTIDs to be displayed.
2018-07-09 12:10:36 +03:00
bfd3d2975d Merge branch '2.2' into develop 2018-07-06 14:56:19 +03:00
f5110209f7 MXS-1942: Use MaxScale version in MaxCtrl
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.
2018-07-05 12:47:28 +03:00
44ef4912e8 Merge branch '2.2' into develop 2018-07-03 21:13:41 +03:00
d96a8b1773 Remove call to pingCluster with only one server
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.
2018-07-03 01:58:43 +03:00
cc0299aee6 Update change date of 2.3 2018-06-25 10:07:52 +03:00
6278f27ab6 Merge branch '2.2' into develop 2018-06-20 10:26:29 +03:00
6df0804e70 Add missing tls-passphrase documentation
The tls-passphrase was not documented in MaxCtrl. Also regenerated the
documentation.
2018-06-18 11:32:28 +03:00
96ed651466 Merge branch '2.2' into develop 2018-06-11 11:28:36 +03:00
283a6d564e Update MaxCtrl dependencies
Updated various npm dependencies of MaxCtrl. Also updated the testing
docker-compose image to use 10.2.
2018-06-11 09:17:02 +03:00
6d1c0e5ba6 MXS-1417: Add drain server command to MaxCtrl
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.
2018-05-22 17:46:26 +03:00
a60f55e375 MXS-553: Display connections and their IDs in MaxCtrl
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.
2018-05-22 17:46:25 +03:00
b6eff12334 Merge branch '2.2' into develop 2018-05-07 09:57:47 +03:00
43cfa5eab5 Fix TSV output in MaxCtrl
The output in --tsv mode could break the TSV format if newlines or tabs
were included in the data.
2018-05-07 09:57:08 +03:00
4a0df97e02 Merge branch '2.2' into develop 2018-05-04 10:18:48 +03:00
8b5221e13a Fix error message when no command is given
The error message when no commad was given referred to the unknown command
[""]. Due to the way the command was printed, it was quite confusing.
2018-05-03 10:48:32 +03:00
658329b648 Merge branch '2.2' into develop 2018-05-03 10:00:44 +03:00