8652 Commits

Author SHA1 Message Date
Markus Mäkelä
ab777c76c7 Add CHILDREN to monitor scripts
The CHILDREN parameter expands to a list of server IPs and ports that are
direct descendants of the server that initiated the event.

Also added a note that the variables can expand to empty strings if
nothing matches the criteria of the variable.
2017-09-18 13:12:17 +03:00
Markus Mäkelä
9080072de5 Add PARENT variable to monitor scripts
The scripts now replace the PARENT variable with the IP and port of the
server that is the direct parent node of the server that initiated the
event. For master-slave clusters, this will be the master IP if the server
that triggered the event is a slave.
2017-09-18 13:00:02 +03:00
Markus Mäkelä
6794b35eb0 Remove Python SQL tests
The tests that involved SQL weren't run and did not really test what was
intended to be tested; the use of a Java Connector with MaxScale.
2017-09-18 11:40:43 +03:00
Markus Mäkelä
bd3e2904e7 MXS-1405: Log subprocess output according to log level
If the executed subprocess prefixes its output with either `error:`,
`warning:` or `info:`, the message will be logged on the appropriate
level. If no prefix is provided, the message is logged on the notice
level.
2017-09-18 11:39:33 +03:00
Markus Mäkelä
130b686d9b MXS-1405: Log subprocess output immediately
When the subprocess outputs a line, the message should be logged
immediately. This allows automated timestamps for the output of the
executed subprocess.
2017-09-18 11:39:33 +03:00
Markus Mäkelä
7e6e8d3e29 MXS-1405: Capture subprocess output
The output by the subprocesses launched by the externcmd system is now
captured and logged.
2017-09-18 11:39:33 +03:00
Markus Mäkelä
eab7b7e2a3 Remove call to qc_sqlite_thread_end in qc_sqlite_process_end
Since the thread initialization was removed from the process
initialization function, the thread finish function should not be called
in the process finish function.
2017-09-17 11:55:12 +03:00
Markus Mäkelä
3f0a738e08 Increase timeouts for tests
bug507 and bug519 had relatively low timeouts which seem to be triggered
quite often.
2017-09-17 10:47:06 +03:00
Markus Mäkelä
d00c5b2838 Move thread initialization into Worker::run
By moving the initialization into Worker::run, all threads, including the
main thread, are properly initialized. This was not noticed before as
qc_sqlite initialized the main thread in the process initialization
callback.
2017-09-15 18:08:49 +03:00
Markus Mäkelä
93dafc9031 Remove CMake cache before reconfiguring
By removing the cache file, the packages of the non-core components are
generate properly.
2017-09-14 15:30:44 +03:00
Markus Mäkelä
fa492764c8 Disable building of C/C unit tests
The tests aren't run and so they don't have to be built.
2017-09-14 15:30:44 +03:00
Markus Mäkelä
099a482f04 Add missing default case to masking filter
The default case for the PS field values was missing.
2017-09-14 15:30:44 +03:00
Markus Mäkelä
616a1e0736 Add missing getopt.h include into maxpasswd.c
The file did not explicitly include the header and thus depended on it
being included by another header.
2017-09-14 15:30:43 +03:00
Markus Mäkelä
45e0e8bb59 Introduce internal protocol command enum
The enums exposed by the connector are not intended to be used by the
users of the library. The fact that the protocol, and other, modules used
it was in violation of how the library is intended to be used.

Adding an internal mapping into MaxScale also removes some of the
dependencies that the core has on the connector.
2017-09-14 15:30:43 +03:00
Markus Mäkelä
914ebb046a Fix component names in package.cmake
The experimental component was mistakenly labeled as external.
2017-09-14 15:30:43 +03:00
Markus Mäkelä
3676dcebb1 MXS-1398: Clean up mysql.h header
Cleaned up the MaxScale version of the mysql.h header by removing all
unused includes. This revealed a large amount of dependencies on these
removed includes in other files which needed to be fixed.

Also sorted all includes in changed files by type and alphabetical
order. Removed explicit revision history from modified files.
2017-09-14 15:30:43 +03:00
Markus Mäkelä
f07cc2b3ef MXS-1398: Update Connector-C to version 3.0.2
Updated the Connector-C to 3.0.2.

Removed the `mysql_com.h` header from `maxscale/protocol/mysql.h` as it is
already included by `mysql.h` and including it causes errors with
Connector-C 3.0.2.

Organized includes in `maxscale/protocol/mysql.h`.
2017-09-14 15:30:42 +03:00
Markus Mäkelä
513060039e MXS-1405: Document script_timeout
Documented the new parameter and added a section to the release notes
about the changes in the monitor scripts.
2017-09-14 12:35:07 +03:00
Markus Mäkelä
fe40511d97 MXS-1405: Take script_timeout into use
The script_timeout parameter is now used by all monitors.
2017-09-14 12:34:34 +03:00
Markus Mäkelä
097f1b4613 MXS-1405: Move externcmd documentation to header
The function documentation is more useful in the public header.
2017-09-13 22:54:26 +03:00
Markus Mäkelä
4f7606ebc0 MXS-1405: Execute EXTERNCMD synchronously
The execution of external commands in MaxScale by monitors needs to be
synchronous in order to prevent the unintended detection of state changes.
2017-09-13 22:51:53 +03:00
Markus Mäkelä
efb1e541e2 Add missing DbfwThread initialization
The thread objects didn't initialize the rule version to the proper value.
2017-09-13 18:03:43 +03:00
MassimilianoPinto
3df5e6f137 Fix CHANGE MASTER TO with binlog server state BLRM_UNCONFIGURED
Fix CHANGE MASTER TO with binlog server state BLRM_UNCONFIGURED
2017-09-13 15:51:35 +02:00
MassimilianoPinto
7e1e63aef6 The poll_fake_write_event() ins no longer needed after the blr_slave_fake_rotate() call
Also removed some useless branches with ‘record’ pointer being not NULL
2017-09-13 13:57:56 +02:00
Johan Wikman
a2d0d24b2c Merge branch '2.1' into develop
Bringing in MXS-1406
2017-09-13 10:02:37 +03:00
Markus Mäkelä
16d3eab59f Merge branch '2.1' into develop 2017-09-12 22:42:11 +03:00
Markus Mäkelä
0f3a13e6ac Remove unused binlogrouter variables
The unused variables cause compilation to fail.
2017-09-12 22:32:40 +03:00
Johan Wikman
49ab5797a2 MXS-1406 Report CALL operation
Basically it would be trivial to report far more operations
explicitly, but for the fact that the values in qc_query_op_t
currently, quite unnecessarily, form a bitmask.

In 2.2 that is no longer the case, so other operations will be
added there.
2017-09-12 15:38:25 +03:00
MassimilianoPinto
43d5f67a76 MXS-1383: fix for some change master to MASTER_LOG_FILE, POS settings that fail.
MXS-1383: fix for some change master to MASTER_LOG_FILE, POS settings
that fail.
2017-09-12 14:33:10 +02:00
MassimilianoPinto
e0c85d02fa Minor fixes for testbinlog.c
Minor fixes for testbinlog.c
2017-09-12 14:33:10 +02:00
Markus Mäkelä
b18c0ed0b8 Assign worker ID in dcb_alloc
Apart from listeners, all DCBs will be assigned to the current
thread. This simplifies the addition of DCBs to worker threads.

Also performed a small cleanup of poll_add_dcb to make it more readable.
2017-09-12 15:14:51 +03:00
Johan Wikman
d2f790a06c Merge remote-tracking branch 'origin/develop' into develop 2017-09-12 11:22:10 +03:00
Markus Mäkelä
3841205704 Update mxs729_maxadmin
The test expected the old result for the test.
2017-09-12 11:17:19 +03:00
Markus Mäkelä
16127d893c Fix compilation failures on CentOS 6
Thread-local non-POD types are not supported on CentOS 6 and thus they
need to be replaced with pointers to the relevant objects and initialized
at runtime.

In addition to this, functor objects don't appear to work as expected in
CentOS 6 and replacing them with a simple for-loop seems to work.
2017-09-12 11:17:19 +03:00
Markus Mäkelä
20d9a60cbb Don't remove util-linux-dev
The util-linux-dev package on Alpine Linux provides the libuuid.so library
and thus it must not be removed.
2017-09-12 11:17:19 +03:00
Johan Wikman
02b9e0a01d Merge branch '2.1.7' into develop-2.1-merge 2017-09-12 11:08:02 +03:00
Markus Mäkelä
2a4bfc31ec Backport mxs1110_16mb fixes to 2.1
Backported changes to mxs1110_16mb from develop into 2.1.
2017-09-12 09:58:20 +03:00
Markus Mäkelä
eb157a3afe Fix bug519
The test attempted to copy the generated CSV file from the MaxScale server
when in fact it was on the master server. Removed HEAVY label from the
test as it takes about 10 seconds to run.

Cherry-picked from commit f80cde2af149fda9c47d8f9131f82527b76af487.
2017-09-12 09:58:20 +03:00
Markus Mäkelä
362234b5d2 Merge branch '2.1.7' into 2.1 2017-09-12 09:43:12 +03:00
Markus Mäkelä
4a42ddfe5f Null-terminate decrypted passwords
The decrypted passwords returned by `decrypt_password` are now properly
null-terminated.
2017-09-12 09:29:26 +03:00
Markus Mäkelä
7a8a12dd28 Update CDash drop site address
The drop site was not set to the correct one.
2017-09-12 09:29:26 +03:00
Markus Mäkelä
40f846cbb0 Add MXS-1396 into 2.1.7 release notes
The bug was included in the 2.1.7 tag but it was not in the release notes.
2017-09-12 09:28:54 +03:00
Johan Wikman
65066ae126 Call drain callback only if drained
In case of write errors the write queue will not be drained. In
that case callbacks should not be called.
2017-09-11 16:56:47 +03:00
Markus Mäkelä
81202eac89 MXS-1400: Fix crash with OpenSSL 1.1
Added the missing parameter for the RSA key generation function.
2017-09-11 12:50:24 +03:00
Markus Mäkelä
9ceb23dd65 MXS-1396: Fix persistent connection hangs
When a COM_CHANGE_USER was executed, it is possible that the server
responds with a AuthSwitchRequest packet instead of an OK packet. In this
case, the server sends a new scramble which must be used to create the 20
byte hash that is expected as the response.
2017-09-11 12:50:24 +03:00
Markus Mäkelä
730072e2ef Add format checks for printf-style functions
Added format checks to functions that expect printf style arguments and
fixed any broken calls to these functions.
2017-09-11 12:49:11 +03:00
Markus Mäkelä
b5202a99f4 Move create TLS parameters to common section
The TLS parameters are now shared by both servers and listeners.
2017-09-11 12:49:11 +03:00
Markus Mäkelä
dd178875a3 Log OpenSSL errors when SSL initialization fails
When the SSL fails to initialize, the errors from OpenSSL should be
logged. This helps to diagnose what is wrong if the error relates to the
certificate files or private keys.
2017-09-11 12:49:11 +03:00
Markus Mäkelä
3ca172f380 MXS-1390: Clean up services resource documentation
Cleaned up the documentation and reformatted the parameter list of
listener creation to be made out of links.

Added some comments to the resource declarations in resource.cc to prevent
the order of them from being altered.
2017-09-11 12:49:11 +03:00
Markus Mäkelä
1a196bc865 MXS-1390: Add SSL documentation to servers resource
The servers resource now shows the SSL parameters in the example
output. It also lists the parameters in the list of valid values for
parameters in the server creation section.
2017-09-11 12:49:11 +03:00