12 Commits

Author SHA1 Message Date
Johan Wikman
cc0299aee6 Update change date of 2.3 2018-06-25 10:07:52 +03:00
Markus Mäkelä
f102a563e9 Add explicit usage to each command
The yargs framework combined with the pkg packaging causes the executable
name to be mangled on installation. For this reason, the usage should be
explicitly added to each command.
2017-09-28 12:40:51 +03:00
Markus Mäkelä
c8490df566 MXS-1390: Add detailed MaxCtrl documentation
Added a more detailed description for commands that needed it.
2017-09-07 10:02:14 +03:00
Markus Mäkelä
70ae93a9ab MXS-1300: Move service checks in cluster to a function
The check that the two MaxScales have the same services is now in a common
function. Added more details into the error message as to why the command
failed. The hosts and their extra services are logged for both the source
and target of the command.

The `cluster diff` command could display the extra services in the diff
but this could be interpreted as a sign that MaxScale could act on that
part of the diff. Returning an error instead of silently ignoring the
extra services should allow for a more consistent user experience.
2017-08-09 11:39:25 +03:00
Markus Mäkelä
f422e92496 MXS-1300: Return output instead of printing it
The `execute` command now returns the output of the command instead of
printint it. This allows the tests to actually test the output of the
commands instead manually verifying that it is correct. It also allows the
library part to be used as an actual library that only returns data.
2017-08-09 11:39:25 +03:00
Markus Mäkelä
db531fb2e2 MXS-1300: Improve MaxCtrl HTTP error messages
The messages now show where the request failed and what was
requested. This should help resolve both develper and end-user problems.

Also fixed the missing logging of the output string in the `parse`
callback of the main function and cleaned up the POSTed server body.
2017-08-09 11:39:24 +03:00
Markus Mäkelä
3bd13cded6 MXS-1300: Fix minor MaxCtrl bugs
Fixed unresolved promises, wrong resources being requested and enabled
strict mode so unknown arguments are not ignored.
2017-08-09 11:39:24 +03:00
Markus Mäkelä
a3e9d5c327 MXS-1300: Add creation/deletion of listeners to cluster sync
New listeners are created and old ones removed. As listeners cannot yet be
altered via the REST API, differing listeners are not modified.
2017-08-09 11:39:24 +03:00
Markus Mäkelä
0dc53df32e MXS-1300: Add listener diffs
The diff command now shows new, removed and changed listeners.
2017-08-09 11:39:24 +03:00
Markus Mäkelä
10bfa072d9 MXS-1300: Add test for cluster command internals
The test tests the internals of the cluster diff generation
algorithms. This should guarantee that the diff calculation and the
resulting synchronization will work as expected without having to test it
on a live cluster.
2017-08-09 11:39:24 +03:00
Markus Mäkelä
8fb4532468 MXS-1300: Add cluster sync command
The `cluster sync` command synchronizes a MaxScale cluster with one
server. This allows new MaxScale instances to be synchronized with an old
instance by using the same configuration file and performing a cluster
sync.
2017-08-09 11:39:23 +03:00
Markus Mäkelä
fad1b4e3e0 MXS-1300: Add simple diff calculation
The `cluster diff` command prints out the difference between the source
and target MaxScale. This allows users to detect changes that have
happened on one MaxScale but not on the other.
2017-08-09 11:39:23 +03:00