198 Commits

Author SHA1 Message Date
Markus Mäkelä
87b1dd2703
Fix stacktrace generation
The stacktraces weren't generated on systems where /bin/test didn't exist.
2019-09-19 10:56:18 +03:00
Johan Wikman
bef9327f4c Remove test_mxb_http test
Fails on too many platforms due to curling to non-existent site
not causing an error.
2019-08-20 12:40:01 +03:00
Esa Korhonen
5a2c92c86d Fix compile error on Centos 2019-08-20 12:40:01 +03:00
Esa Korhonen
e6bf020b9e Continue name resolution fixing, add unit test
name_lookup() now returns all results given by getnameinfo(). When searching
for a server, finding one matching address in the lookup-results is enough for
a match.

Also, added a test for name_lookup(). The test is minimal on its own, as hardcoded
test cases are not generally valid.
2019-08-16 12:52:52 +03:00
Markus Mäkelä
98ddf1679b
Fix name resolution
The ai_addr must be cast into sockaddr_in6 and the sin6_addr member must
be passed to inet_ntop.
2019-08-14 21:34:56 +03:00
Marko
4503f02adb Merge branch '2.3' into 2.4 2019-07-29 15:52:22 +03:00
Marko
3ddcc49288 MXS-2592 Use the correct log level variable 2019-07-29 12:07:02 +03:00
Marko
a9b01ff4cc Merge branch '2.3' into 2.4 2019-07-28 21:43:58 +03: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
Esa Korhonen
d4b712ae84 MXS-2546 Add DNS-resolving to topology detection
When matching hostnames between MaxScale server configuration and the
SHOW SLAVE STATUS-output, use DNS-resolution if a simple string comparison
doesn't find an answer. Results of the resolution are saved to avoid
repeating the operation for the same address.
2019-07-22 11:10:23 +03:00
Markus Mäkelä
5b3c0b8b81
Merge branch '2.3' into 2.4 2019-07-16 13:17:35 +03:00
Markus Mäkelä
3e686e0ba5
Extend stacktrace printing
There was a case that wasn't handled which would happen with
executables. Also removed the path truncation to show where the library
was loaded from.
2019-07-10 11:06:52 +03:00
Markus Mäkelä
f9b1a0a0c4
Merge branch '2.3' into 2.4 2019-07-10 08:17:34 +03:00
Markus Mäkelä
5aa9daaeea
Improve stack trace printing
The stacktrace now removes leading paths from object files and common
source code prefixes. It also skips the first five frames which are always
inside the stacktrace printing code and the signal handler.
2019-07-09 10:56:08 +03:00
Johan Wikman
26a4f0d859 MXS-2446 Provide access to used urls
Makes it possible to later verify that results are for the
urls one expects them to be.
2019-07-03 12:42:22 +03:00
Johan Wikman
7d10a71015 Fix broken Change Dates
Were not correct, so were not updated with all others.
2019-06-25 10:11:55 +03:00
Johan Wikman
0ba779d5a2 Update 2.4.0 Change Date 2019-06-25 10:11:55 +03:00
Markus Mäkelä
20f595d978
Merge branch '2.3' into develop 2019-06-20 13:00:13 +03:00
Markus Mäkelä
7673ee685d
Distinguish stopped and finished workers
By having a separate FINISHED state and a STOPPED state, it is possible to
know at which point in the worker's lifetime an event is done. Posting of
messages before a worker is started is allowed but posting them after the
worker has stopped is not.

This fixes avrorouter related failures and all other failures that stem
from worker messages being ignored at startup.
2019-06-20 12:32:30 +03:00
Markus Mäkelä
03a7850de4
Fix mxb::to_binary_size
The function now handles negative and zero values.
2019-06-20 09:49:19 +03:00
Johan Wikman
c47a2d32fa Fix mxs1980_blr_galera_server_ids
A housekeeping task cannot be removed by name from within the
task function itself. Instead the function must simply return
false.
2019-06-19 15:27:09 +03:00
Markus Mäkelä
aeebf941f6
Merge branch '2.3' into develop 2019-06-19 13:28:58 +03:00
Markus Mäkelä
3d8475f8ed
Merge branch '2.2' into 2.3 2019-06-19 12:37:23 +03:00
Markus Mäkelä
7470a58a32
Fix release mode build failures
Fixed mxb_assert_message and one dcb_printf failure.
2019-06-12 12:15:47 +03:00
Markus Mäkelä
6166da76ea
Add arguments to mxb_assert_message
The macro can now be used to print runtime information in a printf-like
manner. This makes it easier to see exactly why an assertion has failed.
2019-06-11 21:30:45 +03:00
Esa Korhonen
4efa9dbeea Remove maxscale/alloc.h
The remaining contents were moved to maxbase/alloc.h.
2019-06-10 14:11:25 +03:00
Esa Korhonen
3b60bf00e1 Merge branch '2.3' into develop 2019-05-29 18:41:50 +03:00
Esa Korhonen
bed28db3fd Merge branch '2.3' into develop 2019-05-24 13:55:47 +03:00
Johan Wikman
a12a0af887 Merge branch '2.3' into develop 2019-05-15 15:47:36 +03:00
Johan Wikman
0f85baabe1 MXS-2491 Remove global destructor inter-dependency
log.cc:this_unit.slogger depends upon logger.cc:this_unit.ident.
Depending on which one is destructed first, there will be a crash
or then not.

It seems that the destruction order when returning from main()
is not necessarily the same as that when calling exit() in main,
as this bug is triggered with compilers versions and not with other.
2019-05-15 15:46:20 +03:00
Markus Mäkelä
de95fcc9d6
Format rest of the sources 2019-05-10 10:31:12 +03:00
Markus Mäkelä
0d13e694e4
Merge branch '2.3' into develop 2019-05-10 09:28:39 +03:00
Markus Mäkelä
37bfe1cd67
Never exceed persistent connection limits
By doing the persistent connection count incrementation with CAS, value
can be guaranteed to never exceed the configured limit.
2019-05-10 09:11:39 +03:00
Esa Korhonen
e3b5ba9620 MXS-1973 Support reverse DNS for client hostnames in MaxCtrl
May slow maxscale down when used. Only supported for "list sessions",
"show sessions" and "show session <id>".
2019-05-08 15:04:44 +03:00
Johan Wikman
5ab0876a5f MXS-2468 Allow an http::Async object to be reset 2019-05-03 14:57:41 +03:00
Johan Wikman
d498f1042c MXS-2467 Allow 0-delay delayed calls
A 0-delay delayed call simply means that it will be invoked as
quickly as possible.
2019-05-03 13:54:42 +03:00
Markus Mäkelä
ded4050997
Add missing header to test_host_class 2019-04-29 15:59:41 +03:00
Markus Mäkelä
dc244342f8
Prevent assignments in assertions
Using the else branch instead of explicitly negating the assertion makes
sure the compiler catches assignments in assertion expressions.
2019-04-26 11:40:30 +03:00
Niclas Antti
d186244261 Add test for class Host 2019-04-25 15:27:10 +03:00
Niclas Antti
e331b7f432 Add a generic to_string() function. 2019-04-24 12:39:58 +03:00
Niclas Antti
8b7b7b4d3f Add a streamable class (Host) that represents an address and port,
or a unix domain socket.
2019-04-24 12:38:04 +03:00
Esa Korhonen
533d5b522b MXS-1662 Cleanup PAM conversation function
Check fuction call counter properly.
2019-04-15 13:28:44 +03:00
Esa Korhonen
969ef5f9f7 MXS-1662 Add PAM authentication option for admin users
If normal authentication fails and a PAM service is defined, PAM authentication
is attempted. Separate services can be set for read-only users and admin-level
users.
2019-04-15 13:28:44 +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
Johan Wikman
ffd2d80ea0 Link with rt
On CentOS 6 (glibc 2.12) you must explicitly link with rt for
clock_gettime.
2019-04-08 11:24:30 +03:00
Markus Mäkelä
cc1b8b2d56
Use std::begin and std::end
This makes it clear that they are standard functions.
2019-04-02 14:21:54 +03:00
Markus Mäkelä
ac0a3d1d47
Extend string helper functions
Moved mxs::strtok into mxb namespace and added mxb::join for joining
objects into strings.
2019-03-28 13:21:23 +02:00
Niclas Antti
d40e29d5f6 A little houskeeping.
Increasing counter sizes from int to long for averages.
Rename random functions to end with _co instead of _exclusive to
indicate range [close, open[, and to allow future suffixes oc, cc and oo.
2019-03-27 13:15:14 +02:00
Esa Korhonen
1858fe9127 MXS-2271 Monitor modifications always go through Monitor::configure()
Previously, runtime monitor modifications could directly alter monitor fields,
which could leave the text-form parameters and reality out-of-sync. Also,
the configure-function was not called for the entire monitor-object, only the
module-implementation.

Now, all modifications go through the overridden configure-function, which calls the
base-class function. As most configuration changes are given in text-form, this
removes the need for specific setters. The only exceptions are the server add/remove
operations, which must modify the text-form serverlist.
2019-03-12 10:19:45 +02:00
Johan Wikman
72d02d33c0 MXS-2314 Remove unnecessary worker states
The removed states were not used for anything useful.
2019-02-11 13:03:18 +02:00