212 Commits

Author SHA1 Message Date
Markus Mäkelä
63a050bd7a
MXS-3051: Show connection TLS cipher
This tells the user whether a session is using TLS or not. Currently, only
the client TLS cipher is shown in MaxCtrl as the backend ciphers require
additional formatting.
2020-08-28 12:16:17 +03:00
Markus Mäkelä
4dd760aa9a
MXS-3131: Display monitor module in show monitor 2020-08-27 14:47:27 +03:00
Johan Wikman
aa11c960b1 2.3.20 Update change date 2020-06-05 09:31:45 +03:00
Markus Mäkelä
2e1b0c5ddf
MXS-2984: Fix list listeners
Backported the changed from 2.5 to 2.3 and added a test case.
2020-06-01 12:26:26 +03:00
Markus Mäkelä
ce437bc779
MXS-3016: Rename --monitors to --monitor
Renamed the option and changed the type to a string argument. The alias
for --monitors still allows old code to use the same format.
2020-06-01 12:26:26 +03:00
Markus Mäkelä
0f1f9426c3
MXS-2983: Document list option formats
The options that take lists of objects as arguments did not properly
document the expected format.
2020-06-01 12:26:26 +03:00
Markus Mäkelä
7c011b4081
MXS-2998: Fix key-value parsing
The code assumed that no value would hold an equals sign which is
wrong. Added a test case that reproduces the problem and verifies the fix.
2020-05-14 09:34:25 +03:00
Markus Mäkelä
73eba01ce9
Fix cluster sync documentation
The MaxScale instance isn't stopped if the synchronization fails. Added
missing documentation for the command argument.
2020-05-11 07:44:57 +03:00
Markus Mäkelä
a2b5a1aba3
MXS-2980: Forward options to the interactive mode
The --quiet option does not make sense in the interactive mode so it isn't
forwarded.

Added code that reports TLS certificate loading errors. The errors
themselves aren't very exact but at least they give a hint as to why it
failed.
2020-05-11 07:44:56 +03:00
Johan Wikman
f527a8f2e6 2.3.19 Update Change Date 2020-04-23 14:23:57 +03:00
Markus Mäkelä
5dbe4f11c9
MXS-2948: Don't update passwords with cluster sync
Not updating the passwords prevents the cluster sync from breaking working
configurations.
2020-04-07 12:35:56 +03:00
Markus Mäkelä
1ed6304281
MXS-2954: Use correct object for PATCH
The destination object instead of the source object was used. This caused
the PATCH to be a no-op.

Due to how the REST API behaves when it received parameters, the set of
synced parameters must be filtered. The REST API should be more lenient
towards alterations to parameters that don't actually change the value.
2020-04-06 19:37:53 +03:00
Markus Mäkelä
1fc5ec36b1
Add filters to maxctrl show service
The filters were not listed.
2020-03-30 08:53:55 +03:00
Johan Wikman
e0cd6adb26 Update change date for 2.3.18 2020-03-10 10:45:47 +02:00
Johan Wikman
cfb3f79b54 Update 2.3.17 Change Date 2020-02-10 15:28:38 +02:00
Johan Wikman
790d90f229 Update 2.3.16 Change Date 2020-01-15 11:08:51 +02:00
Markus Mäkelä
edb49d6f35
MXS-2824: Document basic user privileges
The documentation was not clear on what the difference between admin and
basic accounts is.
2020-01-07 10:40:41 +02:00
Markus Mäkelä
a73b183555
MXS-2813: Mask password values in output
The password values are now masked with asterisks. This tells whether a
password is set or not but it does not expose any information about the
password itself.
2019-12-19 09:56:00 +02:00
Markus Mäkelä
255071efce
Add version to show servers output
This was missing in maxctrl but it was present in maxadmin.
2019-12-03 09:58:24 +02:00
Johan Wikman
df6c56e7ca Update 2.3.13 Change Date 2019-10-29 12:51:31 +02:00
Markus Mäkelä
d0114d9d48 MXS-2712: Fix field description generation
Longer descriptions broke the formatting. The output is now also formatted
as a Markdown table which makes it work in the generated documentation.
2019-10-29 09:26:41 +02:00
Markus Mäkelä
c20c6e8406 MXS-2712: Add descriptions to list and show commands
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
2019-10-29 09:26:41 +02:00
Markus Mäkelä
cc1c1f9c98 MXS-2712: Remove Blocking Polls from show threads
The value was never defined and was always empty.
2019-10-29 09:26:41 +02:00
Markus Mäkelä
4393de42f1 MXS-2712: Move field definitions out of functions
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.
2019-10-29 09:26:41 +02:00
Markus Mäkelä
9400165376 Cherry-pick: Make maxctrl rebuild when sources change
Cherry-picked 12e6ada259c38d535003c068a49bc525c33830d8 into 2.3.

Since the maxctrl build process uses add_custom_command, we must
explicitly list the sources that it depends on. With this change, maxctrl
is rebuild whenever the sources change.
2019-10-29 09:26:41 +02:00
Marko
918a2964d5 MXS-2592 Add configuration for session specific in-memory log
When enabled each session will write log messages in the in-memory log.
If session ends in error this log is written to the actual log in disk.
2019-07-28 20:56:22 +03:00
Markus Mäkelä
9171dbaad6
Replace trimEnd with trim
trimEnd was introduced in Node.js 10.0 which is not in the 6.0 version we
use.
2019-07-26 09:10:46 +03:00
Markus Mäkelä
8e23a6cdb9
MXS-2607: Remove trailing spaces in MaxCtrl --tvs mode
As the TSV format uses tabs as delimiters, the trailing spaces would
acutally be interpreted as data.
2019-07-19 12:16:04 +03:00
Markus Mäkelä
c878d796be
Merge branch '2.2' into 2.3 2019-07-16 12:59:03 +03:00
Markus Mäkelä
797069df52
Fix npm audit warnings
Updated lodash to a newer version.
2019-07-16 09:34:15 +03:00
Markus Mäkelä
7117ab4719
MXS-2574: Prevent alterations to current user
Due to the fact that the alteration is emulated by deletion and creation
of the user in question, the current user cannot be altered.
2019-06-24 13:06:40 +03:00
Markus Mäkelä
96d5c575f8
Document required create service parameters
When a service is created via MaxCtrl, the `user` and `password`
parameters must be defined. This was not documented in the command help
output.
2019-06-19 10:44:16 +03:00
Markus Mäkelä
33ef183a7f
Update maxctrl dependencies
This fixes some vulnerabilities reported by npm.
2019-05-02 12:31:35 +03:00
Markus Mäkelä
aca3d65bbb
MXS-2381: Add alter user
The `alter user` command makes password changes easier and keeps the usage
consistent across types in MaxScale.
2019-04-17 16:07:04 +03:00
Markus Mäkelä
163b3a2da5
Fix unhandled promise rejection in create monitor
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.
2019-04-17 11:17:33 +03:00
Markus Mäkelä
bc5f9da6c4
Add classification test case
Also removed the dead code that was never used to get coverage to 100%.
2019-04-09 10:56:38 +03:00
Markus Mäkelä
9a5b60a071
Add forced maintenance mode tests
Tested that the force option works and is accepted.
2019-04-09 10:00:50 +03:00
Markus Mäkelä
0cb15976e8
Backport: Add force option to set endpoint
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.
2019-04-09 09:43:18 +03:00
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