8640 Commits

Author SHA1 Message Date
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
Markus Mäkelä
486024aaf4 MXS-1390: Add missing SSL parameter processing to servers resource
Added missing SSL parameters to servers resource output as well as added
the processing of these parameters when servers are created. It is
preferable to define servers as either encrypter or plain and to prevent
the modification of this at runtime.
2017-09-11 12:49:11 +03:00
Markus Mäkelä
3d5ac7e32d Clean up variable types in config_runtime.cc
Used std::string and created a typedef for std::set<std::string>.
2017-09-11 12:49:11 +03:00
Markus Mäkelä
819a76dea9 Fix broken link in Documentation-Contents.md
The notification service document was removed.
2017-09-11 12:49:11 +03:00
Markus Mäkelä
6b27111eab MXS-1390: Update monitor resource documentation
Added missing DELETE request documentation and cleaned up formatting.
2017-09-11 12:49:11 +03:00
Markus Mäkelä
81a3ff6c27 Fix REST API authentication errors
The authentication errors were not sent as the connection was closed
immediately. The reason for this was the fact that if a client request
uploaded data with bad credentials, MaxScale would not send a response if
the connection was kept open. Closing the socket solved the hang but
caused confusing errors on the client side.

The libmicrohttpd library appears to require full processing of any data
uploaded by a client request before a request can be sent. With this
change, the clients receive proper authentication errors in all cases.
2017-09-11 12:49:11 +03:00
Markus Mäkelä
5abb30c357 MXS-1390: Add missing self-link to module command output
The module commands now produce functional self-links. The links most
often require parameters so they are not of great use.
2017-09-11 12:49:11 +03:00
Markus Mäkelä
6cf90ceb15 MXS-1390: Update MaxAdmin documentation
Added the missing documentation for the alteration of
admin_log_auth_failures.
2017-09-11 12:49:11 +03:00
Markus Mäkelä
d8e88af017 MXS-1390: Update MaxScale and service resource documentation
Added module command and individual listener resource
documentation. Cleaned up formatting of values in the MaxScale resource
document.
2017-09-11 12:49:11 +03:00
Markus Mäkelä
c0411445a8 MXS-1390: Update users resource documentation
Updated the users resource documentation with the new changes that were
added when user authorization was added.
2017-09-11 12:49:11 +03:00
Markus Mäkelä
d2b474e021 Fix enabled admin users being shown as basic users
The enabled admins for the Linux users were shown as basic users. This was
caused by the separation of the two admin types.

Added tests that check that enabled Linux accounts show the correct type
in the output.
2017-09-11 12:49:11 +03:00
Markus Mäkelä
a3402dfebf MXS-1390: Update main REST API document
Updated the document and removed faulty information.
2017-09-11 12:49:11 +03:00
Johan Wikman
faa1cc815d Merge branch '2.1' into 2.1.7 2017-09-11 12:28:02 +03:00