286 Commits

Author SHA1 Message Date
Esa Korhonen
19dc1fd6e3 Merge branch '2.3' into 2.4 2020-07-28 16:15:50 +03:00
Esa Korhonen
08f5174915 MXS-2900 Rename maxscale-system-test directory to system-test
A link with the old directory name is provided.
2020-07-28 15:24:27 +03:00
Markus Mäkelä
c2b868e8aa
Merge branch '2.3' into 2.4 2020-04-23 14:51:11 +03:00
Markus Mäkelä
be567b6029
MXS-2969: Restart MaxScale on upgrade
Renamed the postrm script to prerm since it is executed before
uninstallation.

Silenced the output of the systemctl disable commands and added a
conditional restart of MaxScale if a MaxScale instance is running.

Use getent instead of grep to detect if the maxscale user needs to be
created.
2020-04-21 09:29:16 +03:00
Markus Mäkelä
c270cfad31
Install 2.4 license file 2020-03-30 10:18:18 +03:00
Markus Mäkelä
2630cc930f
Install 2.3 license file 2020-03-30 08:53:55 +03:00
Markus Mäkelä
7e72f853a2
MXS-2601: Remove MaxAdmin from example config 2019-07-16 13:04:52 +03:00
Markus Mäkelä
9a2a5384d2
Remove plugins subdirectory from CMake 2019-06-27 10:51:21 +03:00
Markus Mäkelä
10272ce633
Merge branch '2.3' into develop 2019-06-12 18:15:37 +03:00
Markus Mäkelä
239c4a8615
MXS-2549: Install prelink config file
The prelink configuration file should prevent maxctrl from being corrupted
by it.
2019-06-12 17:49:41 +03:00
Esa Korhonen
82229b7a1e Merge branch '2.3' into develop 2019-06-10 14:08:17 +03:00
Esa Korhonen
57029bb1a1 MXS-2445 Add logrotate config file 2019-06-10 12:51:03 +03:00
Markus Mäkelä
44d1b821c3
Merge branch '2.3' into develop 2019-06-03 13:54:55 +03:00
Markus Mäkelä
4e6ca33053
Add UBSAN flag to builds
The -DWITH_UBSAN flag enables the undefined behavior detection provided by
GCC.
2019-05-31 14:01:14 +03:00
Markus Mäkelä
c0b238a9e7
MXS-2152: Add rudimentary test coverage collection
If the build is configred with -DGCOV=Y, a HTML report of code coverage is
generated in the log publish directory.
2019-05-10 13:20:32 +03:00
Markus Mäkelä
956b7ee919
Disable unused return value warning 2019-05-06 16:05:50 +03:00
Markus Mäkelä
20afbfca76
Merge branch '2.3' into develop 2019-05-02 20:24:04 +03:00
Markus Mäkelä
09d04a09d4
Merge branch '2.2' into 2.3 2019-05-02 20:11:51 +03:00
Timofey Turenko
753fa0552a MXS-2366: Fix RPATH setting for tarball
All RPATH setting have to be set before generation of any binary.
Defining of CMAKE_INSTALL_RPATH is moved to separate file which is called from main CMakeLists.txt in the beginning, just after install_layout.cmake
2019-04-30 14:18:33 +03:00
Esa Korhonen
74634abc80 MXS-1662 Move PAM authentication function into maxbase
The same code can be used for REST-API authentication.
2019-04-09 14:41:40 +03:00
Esa Korhonen
dae99b2acd Merge branch '2.3' into develop 2019-01-15 15:57:06 +02:00
Esa Korhonen
1c8c222ad1 MXS-2112 Add python script for assembling support files
The script adds config and log files into a zip archive. Passwords in
config files are censored. Also attempts to read current status by calling
maxctrl. If core-file exists, runs gdb on it to gather call stack.
The script is installed to the binary file directory.
2019-01-14 16:34:30 +02:00
Johan Wikman
8d77ddec63 MXS-2208 Add simple Http library
- Built on top of Curl
- Currently only GET
2018-12-05 12:48:42 +02:00
Esa Korhonen
0c7e737eb7 Move some mysql/mariadb utilities to maxutils
Can be used in system tests later on.
2018-11-30 13:03:37 +02:00
Markus Mäkelä
8b9fdaa0cb
Remove HTTP functionality
It wasn't used so it can be removed.
2018-10-03 08:41:45 +03:00
Esa Korhonen
fd176c4122 Merge branch '2.2' into develop 2018-09-11 12:57:19 +03:00
Markus Mäkelä
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
Markus Mäkelä
f8fb9510c9
Add HTTP GET function
The function performs a HTTP GET on a URL and returns the HTTP response.
2018-08-23 15:46:45 +03:00
Markus Mäkelä
930be8d77a
Fix CMake problems in system test
The paths were wrong in the scripts used to run tests. The same problem
was in the CMake files that used CMAKE_SOURCE_DIR instead of
CMAKE_CURRENT_SOURCE_DIR.

Added missing check for BUILD_SYSTEM_TESTS in avrorouter for the
workaround to building without all dependencies present.
2018-08-20 13:56:58 +03:00
Markus Mäkelä
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
Markus Mäkelä
67df3ad4f0
Use option() CMake command
This is the appropriate command for ON/OFF options controlled by the
user. Also removed the useless C99 option which must always be on (using
C11 would be another option).
2018-08-20 13:56:58 +03:00
Markus Mäkelä
f09afa2967
Combine regression test suite and main CMake projects
Combining the projects makes it easier to use common components. This
fixes the build failure of maxutils due to missing jansson definitions.
2018-08-17 14:29:28 +03:00
Markus Mäkelä
7e857e36eb
Enable use of TSAN
The -DWITH_TSAN option enables the ThreadSanitizer if libtsan is
installed.
2018-07-31 09:41:14 +03:00
Markus Mäkelä
7254a7c525
Make maxutils a standalone library
The only way to cleanly separate the maxutils library from the MaxScale
CMake project is to make it a standalone CMake project. With the help of
ExternalProject, it should be relatively easy to use.
2018-06-22 13:59:57 +03:00
Niclas Antti
d2e1cfdf4e MXS-1777 fix CMakeLists.txt for utility library
Last minute directory changes were not fully applied in CMakeLists.txt
2018-06-18 15:27:44 +03:00
Niclas Antti
2514c99d9e MXS-1777 Create new utility library
The purpose of this library is to create a utility library that is not
dependent on maxscale for use in both maxscale and system test, and
possibly other apps. As time permits general purpose utilities from
maxscale-common can be moved to the new library.

Here are answers to questions you may have:
- A top level directory "maxutils" contains the libraries. The current
  structure is simply maxutils/maxbase. Each library has an 'include' and
  a 'scr' directory where public headers exist in 'include'
- Code is in a namespace with the same name as the directory.
- Headers are included like this: `#include <maxbase/stopwatch.hh>`
- In case the library is published on its own, the include directives stay
  the same (headers would be in /usr/include/maxutil, for example).
- I am not advocating many small libraries. But if some larger library
  is written, say a general purpose statemachine, it would not pollute
  util/maxutil but go to util/maxsm.
  Another example: Worker. It is a larger concept, but used so widely in
  code that it could very well live in maxutil.

NOTE: this was previously Review Request #6245.
2018-06-15 12:05:57 +03:00
Niclas Antti
68c0c59d92 The purpose of this library is to create a utility library that is not
dependent on maxscale for use in both maxscale and system test, and
possibly other apps. As time permits general purpose utilities from
maxscale-common can be moved to the new library.

Here are answers to questions you may have:
- Headers and sources are separated to allow public/private headers.
- A top level directory "util" contains the libraries. The current
  structure is simply util/maxbase. The name of the top level
  directory is not important.
- Code is in a namespace with the same name as the directory.
- Headers are included like this: \`#include <maxbase/stopwatch.hh>\`
- In case the library is published on its own, the include directives stay
  the same (headers would be in /usr/include/maxbase, for example).
- I am not advocating many small libraries. But if some larger library
  is written, say a general purpose statemachine, it would not pollute
  util/maxutil but go to util/maxsm.
  Another example: Worker. It is a larger concept, but used so widely in
  code that it could very well live in maxutil.

NOTE: this was previously Review Request #6245.
2018-06-14 16:10:22 +03:00
Markus Mäkelä
a367267756
Enable newer compiler for CentOS 6
Install devtoolset-4 on CentOS 6 to enable C++11 on all supported
platforms. Change compiler flags to `-std=c++11` to explicitly use C++11.
2018-06-12 19:40:34 +03:00
Johan Wikman
f388e2f838 Merge branch '2.2' into develop 2018-02-12 14:00:40 +02:00
Markus Mäkelä
eab4ec1768
Add component specific package descriptions
The package descriptions, summaries and licenses now use a generic
mechanism. This makes it easier to add new components that only include
small parts or use a different license.

Also updated the descriptions, the license versions and package summaries
for the main packages.
2018-02-12 13:31:10 +02:00
Johan Wikman
fcde23e6fe Merge branch '2.2' into develop 2018-02-08 18:40:29 +02:00
Markus Mäkelä
b2f17494ad
Always build Connector-C
The connector is now unconditionally build from source.
2018-02-08 12:48:56 +02:00
Johan Wikman
5326c8db5c Merge branch '2.2' into develop 2018-02-08 12:48:06 +02:00
Markus Mäkelä
2b25ec13d8
Include the connector directory in the right place
The directory where the headers are located should be included only after
the connector is built or found.
2018-02-08 12:35:03 +02:00
Markus Mäkelä
2181c9d240
Include MariaDB Connector-C headers first
The MariaDB Connector-C headers that are built by MaxScale must be
included before any system headers.

Fixed code that explicitly included the <mysql.h> header to use the
<maxscale/protocol/mysql.h> wrapper instead.
2018-02-07 16:07:17 +02:00
dapeng
0696f3f60a add -fno-omit-frame-pointer to cflags (#165) 2018-01-31 11:57:25 +02:00
Markus Mäkelä
070df73d99 MXS-1538: Integrate CDC-Connector into MaxScale
Added the files from the repository to MaxScale. Created a new CMake
function for installing development libraries.
2018-01-22 15:29:21 +02:00
Markus Mäkelä
bd39284f9c Merge branch '2.1' into 2.2 2017-10-03 14:30:06 +03:00
Markus Mäkelä
69557c650e Fix stack trace generation
The stack traces weren't logged as the LOG_ALERT priority wasn't enabled
by default. As an alert is intended to be something that must leave a
trace somewhere, and as such, it must not be possible to disable it. For
this reason, it is acceptable to always log the message if the priority is
LOG_ALERT.

Added the -rdynamic linker flag so that all symbols are exported when
linking MaxScale.

As the stack trace is printed in a signal handler, the first attempt
should be to print the stack trace to the standard output. This way the
output is printed before an attempt to use malloc is made when it is
logged to the logfile.
2017-09-30 12:37:40 +03:00
Markus Mäkelä
fb9b027842 Enable optional use of ASAN
AdressSanitizer is a lightweight memory error detector that instruments at
compile time instead of at execution time. This allows serious memory
errors to be detected without the cost of slowing down the whole program
that often happens when Valgrind is used. It is also easier to enable for
test runs as it is a simple compiler flag.
2017-08-17 15:02:16 +03:00