5670 Commits

Author SHA1 Message Date
Markus Makela
649efb91b5 Fix broken upgrades on CentOS 7
The upgrade process removed the /var/lib/maxscale directory as the newer
version didn't use it. This can be fixed by installing an empty directory
into /var/lib/maxscale.
2016-09-23 16:40:03 +03:00
Markus Makela
e618370cdb MXS-875: Fix regexfilter matching
The return values of pcre2_match are now properly handled. A positive
match is a return value which is greater than or equal to zero. This fix
should give a small performance boost to as memory is no longer needlessly
allocated.
2016-09-23 14:43:03 +03:00
Johan Wikman
542666ed16 qc_sqlite: Remove leak
Previously a query like e.g.

    delete t11.*, t12.* from t11,t12 where t11.a = t12.a;

would cause a leak. The code for freeing that memory was present
but commented out because it used to cause a crash.

Now no crash appears, so it would seem that the crash was caused
by something else that no longer is present.
2016-09-23 11:26:48 +03:00
Johan Wikman
049f823d37 Update tag information 2016-09-22 13:50:57 +03:00
Markus Makela
97858c164d Update library dependencies
Libcurl was not listed in the list of required packages.

The tarball installation instruction did not list any of the required
libraries.
2016-09-22 12:38:58 +03:00
Johan Wikman
a8118b98b4 Further refine the tarball instructions 2016-09-21 14:26:15 +03:00
Markus Makela
0882541c80 Make the default directories configurable
The default directories can now be changed at build time. This allows
tarballs to look for libraries in a more sensible place.
2016-09-21 14:21:18 +03:00
Johan Wikman
4422cd87eb Update tarball installation instructions
The /var/[log|lib|run|cache]/maxscale directory must be created
manually.
2016-09-21 13:07:13 +03:00
Markus Makela
578f21e757 MXS-874: Clear closed state before reconnecting to a server
The backend reference states should be cleared when a reconnection attempt
is made. Should the creation of a new DCB succeed, the backend should no
longer be closed.
2016-09-21 11:15:57 +03:00
Markus Makela
bd60fbde7e Create dummy files in /var directories for tar.gz packages
These files allow seemingly empty directories to be installed on various
platforms. Some platforms had problems installing empty directories.
2016-09-21 11:11:24 +03:00
Markus Makela
f6888ef205 Install all /var directories
The /var/lib/maxscale directory wasn't installed and tarballs didn't have
any /var directories.
2016-09-21 09:41:00 +03:00
Johan Wikman
ba2cafc65e Update tarball instructions 2016-09-20 16:36:33 +03:00
Markus Makela
715f978051 Add TARBALL variable to CMake
The TARBALL variable controls if a special tar.gz package is built when
packages are generated. This package has a different directory structure
compared to the RPM/DEB packages.

If RPM/DEB packages are built, tar.gz packages are not built. This makes
RPM/DEB generation faster and allows tarballs to be built separately with
a proper directory structures.
2016-09-20 16:32:21 +03:00
Markus Makela
1331bf9ae8 Add CPACK_PACKAGE_FILE_NAME to CMake cache
Adding CPACK_PACKAGE_FILE_NAME to the CMake cache allows the user to
control it. With this, custom tarball names can be easily generated.
2016-09-20 16:32:21 +03:00
Markus Makela
dfec3c8552 Install maxbinlogcheck in the right place
Maxbinlogcheck was installed in the wrong place.
2016-09-20 16:32:21 +03:00
Johan Wikman
0f6d4e4cdb Fix typo in tarball documentation 2016-09-20 13:58:28 +03:00
Johan Wikman
6ec999851f Update 2.0.1 release notes 2016-09-20 13:00:39 +03:00
Johan Wikman
9a9511fc58 Update tarball instructions 2016-09-20 12:46:43 +03:00
Markus Makela
b1b2e5b770 Don't free the shared shard maps
When client sessions are closed, the shared shard maps should not be freed.
2016-09-20 11:33:09 +03:00
Johan Wikman
e4543881d2 Add instructions for installing a package 2016-09-20 10:14:26 +03:00
Markus Makela
92ef33327e MXS-870: Handle non-contiguous session command responses
Session command responses with multiple packets could be spread across
multiple, non-contiguous buffers. If a buffer contained a complete packet
and some extra data but it wasn't contiguous, the debug assertion in
gwbuf_clone_portion would fail. With release builds, it would cause
eventual out-of-bounds memory access when the response would be sent to
the client.
2016-09-19 09:58:20 +03:00
Johan Wikman
7fc7249349 Update installation instructions 2016-09-16 12:25:29 +03:00
Markus Makela
89f9f4a42f Lock writeq before inspecting it
Looking at the contents of the writeq should be done under a spinlock
otherwise it is possible that another thread grabs the queue.
2016-09-16 10:05:50 +03:00
Markus Makela
2a4addc298 Clear waiting results flag on client errors
When a backend causes an error and it should be sent to the client, the
backend reference was closed but the waiting results state was not
cleared. This caused a debug assertion to be hit.
2016-09-16 09:58:56 +03:00
Johan Wikman
7bd0b19b59 Update MaxScale version number 2016-09-15 23:13:33 +03:00
Markus Makela
029e6574da MXS-812: Always reset counters when backend is closed
The active operation counters are now closed every time a backend referece
is taken out of use. This should fix a few debug assertions that were hit
in tests.
2016-09-15 08:31:15 +03:00
Markus Makela
6dc75d4b9c MXS-860: Detect whether replication is configured
The `detect_stale_slave` functionality used to only work when MaxScale had
the knowledge that a master server has existed and that replication was
working at some point in time. This might be a "safe" way to do it in
regards to staleness of the data but in practice it is preferrable to
always allow slave to be used for reads.

This change adds the missing functionality to the monitor by assigning
slave status to all servers which are configured as replication slaves
when no master can be found.

The new member variable that was added to the SERVER should be removed in
2.1 where the server_info offers the same functionalty without "polluting"
the SERVER type.
2016-09-12 15:59:08 +03:00
Markus Makela
8be833640f Change restart type to on-abort
MaxScale should only restart if an abort is detects, i.e. MaxScale
crashes.
2016-09-12 09:35:11 +03:00
Markus Makela
e26f3795e2 Remove useless parts from CHK_LOGFILE
The CHK_LOGFILE macro first asserts that the values being checked are
valid and then proceeds to evaluate it again. The result of this
evaluation was not assigned to anything and it caused GCC 6.1.1 to produce
a warning.
2016-09-11 20:37:50 +03:00
Markus Makela
717b623587 Fix crash in server_free
server_free tried to free a char array which wasn't malloc'ed.
2016-09-09 20:39:16 +03:00
Markus Makela
76ea31bc2d Add MXS-812 to release notes
MXS-812 is now mentioned in the 2.0.1 release notes.
2016-09-09 17:02:41 +03:00
Markus Makela
7a144079b9 MXS-812: Fix active operation counters
When a client executes commands which do not return results (for example
inserting BLOB data via the C API), readwritesplit expects a result for
each sent packet. This is a somewhat of a false assumption but it clears
itself out when the session is closed normally. If the session is closed
due to an error, the counter is not decremented.

Each sesssion should only increase the number of active operation on a
server by one operation. By checking that the session is not already
executing an operation before incrementing the active operation count the
runtime operation count will be correct.
2016-09-09 16:57:18 +03:00
Markus Makela
4a95439a8d Don't restart even on abnormal failures
If systemd restarts MaxScale when an abnormal exit is detected, it is
likely to happen again. This leads into a loop which causes multiple
maxscale processes on the same machine. One example of this behavior is
when systemd times MaxScale out when it is starting.
2016-09-09 16:38:27 +03:00
Markus Makela
f161c1e423 Add section about changed defaults to release notes
A list of changes in the defaults is good to have in the release notes.
2016-09-09 15:57:30 +03:00
markus456
633f01c3df Merge pull request #110 from mariadb-corporation/GL-doc-fix
Clarify detect_stale_master defaults
2016-09-09 15:57:07 +03:00
Guillaume Lefranc
559f740910 Clarify detect_stale_master defaults 2016-09-09 14:34:13 +02:00
Johan Wikman
abd1ea53a6 Add tarball installation instructions 2016-09-09 13:24:49 +03:00
Johan Wikman
b6d743fd03 Create MaxScale directories
If the installation directory is something else than /usr,
then the directories

    <install-dir>/var/cache/maxscale
    <install-dir>/var/log/maxscale
    <install-dir>/var/run/maxscale

will be created at installation time.
2016-09-09 11:00:06 +03:00
Johan Wikman
a87a9c75e5 Add --basedir flag
If maxscale is invoked with '--basedir=PATH', all directory paths
and the configuration file to be defined relative to that path.
2016-09-09 10:53:36 +03:00
Markus Makela
60c61157cc Update limitations document
The document is now split into module type sections. Added documentation on the
limitations on multiple monitors monitoring the same servers and filters not
receiving complete packets when used with readconnroute.
2016-09-08 23:40:39 +03:00
Johan Wikman
f798bc9f64 Print correct default directories
Invoking 'maxscale --help' now displays the correct default
directories.
2016-09-08 14:33:21 +03:00
Johan Wikman
a074605c58 MXS-825: Add support for --execdir
Although claimed in the output of "--help", the long option
"--execdir" was not supported. Support for that now added.

The long options have now also been sorted in the same order
as the options are displayed by the help, to make it easy to
check that everything is there.

Further, the description column of the output of --help has
been aligned.
2016-09-08 13:17:53 +03:00
Markus Makela
a474dad753 Fix crash when multiple MySQL monitors monitor same servers
The monitors always freed and reallocated the memory for the slaves. It
was always of the same size so a static array of that size should also
work.
2016-09-08 13:02:27 +03:00
MassimilianoPinto
4940e1482f Update Replication-Proxy-Binlog-Router-Tutorial.md
Removed "servers=" in the example
2016-09-08 08:52:14 +02:00
Johan Wikman
a4903cff73 Accept 'password' in addition to 'passwd'
In the configuration section of services and monitors, the
password to be used can now be specified using 'password'
in addition to 'passwd'.

If both are provided, then the value of 'passwd' is used. That
way there cannot be any surprises, should someone for whatever
reason currently (in 1.4.3 an invalid parameter will not prevent
MaxScale from starting) have a 'password' entry in his config file.

In the next release 'passwd' can be deprecated and in the release
after that removed.
2016-09-07 09:41:38 +03:00
Markus Makela
fca09e0d7b MXS-836: Fix retry_on_failure not working
The service start retry mechanism mistakenly returned an error when a
service failed to start but a retry was queued. This caused MaxScale to
stop whenever a service failed to start.
2016-09-06 15:41:41 +03:00
Markus Makela
3e08c248b9 Fix maxinfo hang
dcb_count_by_usage did not iterate the list properly and would get stuck on the
first inactive DCB. Since this function is only called by maxinfo, it would be
the only one to get stuck.
2016-09-06 14:31:34 +03:00
Johan Wikman
0aec0c483c Cleanup early error logging
If the log file could not be opened, it was reported over and
over and over again to stderr.
2016-09-06 10:50:13 +03:00
Johan Wikman
ca6c619d60 Do not access uninitialized file object
If the opening of the logfile fails it must not be assumed
to have been opened when cleaning up.
2016-09-06 10:49:41 +03:00
Markus Makela
4e3de4c56d Rename and relocate CDC Python examples
Moved the CDC example scripts into the protocol directory and added the .py
suffix. Fixed all references to these scripts.
2016-09-05 10:32:37 +03:00