Commit Graph

12169 Commits

Author SHA1 Message Date
faa65b70f9 MXS-1315 Accept hostnames as source parameters
If there are hostnames as source parameters client hostnames are
attempted to be resolved and checked against saved source hostnames.
2018-08-26 22:50:25 +03:00
1cb96e3152 Cleanup namedserverfilter
Use range-loops when possible and other small cleanup.
2018-08-26 22:50:25 +03:00
f18b6bc28c MXS-1315 Add support for multiple source addresses
Source parameter in NamedServerFilter can now contain a list of source
addresses seperated by comma. This parameter is parsed into a list of ip
addresses and checked against incoming client connections.
2018-08-26 22:50:25 +03:00
421ecdd86b Fix crash caused by wildcards in NamedServeFilter source parameter
Use the formated IP address instead of the one with wildcard symbols.
2018-08-26 22:46:40 +03:00
2c54f28fae MXS-2024: Validate COM_CHANGE_USER packet before use
The use of strcpy on data that is assumed to be null terminated causes
reads and writes past buffers.
2018-08-24 20:52:52 +03:00
4a637b024d Fix mysqlmon_failover_no_slaves
The current monitor detects the extra slave connection before
failover is launched, turning the entire feature off. That part of
the test has been removed.
2018-08-24 12:08:22 +03:00
13c7072da1 Separate CCRFFilter hints section from the main overview
The text changed subjects rather abruptly. Having the hint part of it
gives some context and appears to make the text flow nicer.
2018-08-23 23:52:42 +03:00
8cfc966561 MXS-1929: Update unit tests with monitor changes
The user is a mandatory parameter and needs to be passed when a monitor is
created.
2018-08-23 15:46:47 +03:00
1f8ed106b3 MXS-1929: Test configuration creation under load
The test case performs the creation and destruction of a complete MaxScale
configuration and repeats the process multiple times.
2018-08-23 15:46:47 +03:00
3eb7072972 MXS-1929: Improve runtime monitor creation
The monitor JSON is now more closely inspected before the actual monitor
is allocated. This prevents creation of monitors without credentials which
was previously possible.

The monitor alteration was also changed to stop and start the monitor only
once instead of stopping and starting after each parameter
modification. This prevents multi-parameter updates from failing due to
monitors seeing a partial set of the new values. Currently only the
`replication_user` and `replication_password` parameters could cause this.
2018-08-23 15:46:47 +03:00
fe124b79cc MXS-1929: Fix state of services created at runtime
If a service was created at runtime, it would be in the Allocated state
until it was stopped. The serviceStart function isn't necessary from a
functional point of view (a new service cannot have listeners that need
starting) but it does set the correct state and it's the "right" thing to
do.
2018-08-23 15:46:46 +03:00
befb25a14a MXS-1929: Add parameters to maxctrl create monitor
The parameters for the monitor can now be defined when the monitor is
created. This makes the filter, monitor and service creation consistent.
2018-08-23 15:46:46 +03:00
065ee50d53 MXS-1929: Start monitors after creation
Monitors created via the REST API that were started and configured
successfully should also be started. This removes the extra step of
starting the monitor after creating it.
2018-08-23 15:46:46 +03:00
a6bef0a80d Add credentials for remove REST API calls
The base URL and credentials used for REST API calls can now be defined in
the [maxscale] section. This allows encrypted passwords to be used.
2018-08-23 15:46:46 +03:00
fe7d7475a4 Improve PID file check
The executable name of the PID is now checked to be maxscale. This fixes
the problem where MaxScale would refuse to start if a stale PID file had a
PID of a process that's not a MaxScale process.
2018-08-23 15:46:46 +03:00
518a4ef3bd Update release notes
Added query classifier cache and moved ssl changes to the correct section.
2018-08-23 15:46:46 +03:00
ad36a50e97 Remove log initialization form print_log_n_stderr
The log manager must not be initialized twice. If an error is to be logged
to a file, the log manager has already been initialized.
2018-08-23 15:46:46 +03:00
1692765503 Enable query classifier cache by default
Enabling it will give a performance improvement and it offloads work from
the CPU. This leads to better and more complete utilization of system
resources.
2018-08-23 15:46:45 +03:00
13c04324cf Add master extraction via REST API
The master server of a monitor can now be extracted with the
mon_get_external_master function. It uses the REST API to find a master
server in the set of servers monitored by a monitor.
2018-08-23 15:46:45 +03:00
934600f8fc Add minimal HTTP GET test
The test does a request and prints the responses. It is done to see that
the functionality works. Also added a timeout of 10 seconds to both the
connection and data transfer phases.
2018-08-23 15:46:45 +03:00
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
91ab59530f Use pending status in external master checks
When the replication status from the external master is checked, the
pending status must be used. This makes sure that the SlaveStatusArray and
the server state are sync.

Also extended the message that was logged when the external master was
lost. By adding the network address there, it makes it easier to see where
the server was replicating from if only the log file is available.
2018-08-23 15:46:45 +03:00
61bb172033 Cleanup failover/switchover
Replication settings warnings are printed once more. Changed some
parameter names to be more consistent within the monitor.
2018-08-23 10:28:47 +03:00
f93578c089 Remove debug.h include in LuaFilter 2018-08-23 10:25:01 +03:00
9799cfdb2b MXS-1735: Clarify differences between MaxScale and server
The server allows both unencrypted and encrypted connections on the same
port. MaxScale only allows either encrypted or unencrypted
connections. The differences as well as the reasoning for this need to be
documented.
2018-08-23 09:32:20 +03:00
75c298f63c MXS-2011 Make listener_set_ssl_version() const correct 2018-08-23 09:24:46 +03:00
8e7b012852 Don't call some of atexit functions twice
Registering of atexit functions was fixed so these functions don't need
to be called here anymore.
2018-08-22 22:51:32 +03:00
69722a32ca Fix crash caused by wildcards in NamedServeFilter source parameter
Use the formated IP address instead of the one with wildcard symbols.
2018-08-22 22:46:46 +03:00
7e3f5a03b6 Add a default value for BUILD_SYSTEM_TESTS
Adding a default value makes it visible in the CMake configuration GUI.
2018-08-22 16:43:17 +03:00
5485f83e75 MXS-1929: Always store the module name parameter
Services, monitors and filters all use the parameters for object
serialization. This means that when the object is created, the module
parameter must be in the parameter list.
2018-08-22 16:43:17 +03:00
276ff70506 MXS-1929: Prevent alterations to filters and servers
These parameters must not be altered at runtime via the `alter service` or
`alter monitor` commands.
2018-08-22 16:43:17 +03:00
73401837fd Skip interactive mode in tests
The automated tests aren't currently suited for testing it.
2018-08-22 16:43:17 +03:00
706f7ae86d Add MaxCtrl interactive mode to release notes
Mentioned the new behavior in the release notes.
2018-08-22 16:40:36 +03:00
fc7436c52a Add interactive mode to MaxCtrl
If no command is given, MaxCtrl is started in an interactive mode.
2018-08-22 16:40:36 +03:00
4480995089 MXS-1996: Remove misleading errors
The errors are expected if the file is empty.
2018-08-22 14:23:25 +03:00
9663c52f50 MXS-2015: Remove buffer iterator
The iterator to the buffer isn't really needed as the beginning of the
buffer can be used instead. This should make the code more robust. Changed
the internal buffer from a vector to a deque as the latter is more
appropriate for insertion on one end and consumption on the other.
2018-08-22 14:23:25 +03:00
f2dfd39f79 Clean up JSON diagnostics
Now prints all slave connections.
2018-08-22 12:23:28 +03:00
916b72a733 Clean up loops
Changed many of the iterator loops to range loops.
2018-08-22 12:22:45 +03:00
3777da96bd Miscellaneous cleanup
Removes needless status assignments and unused code. Moves and modifies some comments.
2018-08-22 12:11:33 +03:00
ab9a9f92cb MXS-2020 Remove maxscale/debug.h
- Removed from all files.
- maxbase/assert.h included where necessary.
2018-08-22 11:35:35 +03:00
3f53eddbde MXS-2020 Replace ss[_info]_dassert with mxb_assert[_message] 2018-08-22 11:34:59 +03:00
b1e405442f MXS-2020 Replace ss_debug with MXB_AT_DEBUG 2018-08-22 11:34:06 +03:00
84876b881b MXS-2020 Define ss_dassert etc. in terms of mxb_assert 2018-08-22 11:34:06 +03:00
88c3cd567d Remove HASHTABLE
Not used anyware, should have been removed ages ago.
2018-08-22 10:48:12 +03:00
e2ba7151b7 MXS-2008 Enforce right initialization of maxbase
Now maxbase can only be initialized via maxbase::init().
2018-08-21 14:35:51 +03:00
24ab3c099c Move top of the file "#pragma once" to after the following comment (swap them). If the comment is a BPL update it to the latest one 2018-08-21 13:13:15 +03:00
03cefcc4ac MXS-2012 Write replication lag to SERVER
Allows routers to read the value.
2018-08-21 11:51:10 +03:00
44a57dbefd Master can be a slave
This is possible if read_only is turned ON on the master and there is
no alternative master to swap to.
2018-08-21 11:51:10 +03:00
1c508cd413 MXS-2012 Read and print Seconds_Behind_Master
Replaces the old replication lag detection.
2018-08-21 11:51:10 +03:00
0d762b2019 MXS-2012 Remove old replication lag detection
The method was quite disruptive as it continuosly wrote to the database.
Also removed the MaxScale ID global, as it wasn't used for anything else.
2018-08-21 11:51:10 +03:00