197 Commits

Author SHA1 Message Date
Johan Wikman
78829429ae MXS-2178 Add WD workaround to REST-API and maxadmin 2018-11-21 13:31:49 +02:00
Markus Mäkelä
c552845fd1
Deprecate old admin modules
Added notification messages for the deprecation of the old admin interface
modules. Also added notes into the documentation about their deprecation.
2018-11-20 10:51:49 +02:00
Markus Mäkelä
9278da1f54
MXS-2067: Remove spinlock.h
Removed the spinlock.h header and replaced with plain pthread types and
functions.
2018-09-28 12:18:24 +03:00
Markus Mäkelä
71ffef5708
Partially revert 4ba011266843857bbd3201e5b925a47e88e1808f
Add back leading operator enforcement.
2018-09-20 15:57:30 +03:00
Markus Mäkelä
d11c78ad80
Format all sources with Uncrustify
Formatted all sources and manually tuned some files to make the code look
neater.
2018-09-10 13:22:49 +03:00
Niclas Antti
c447e5cf15 Uncrustify maxscale
See script directory for method. The script to run in the top level
MaxScale directory is called maxscale-uncrustify.sh, which uses
another script, list-src, from the same directory (so you need to set
your PATH). The uncrustify version was 0.66.
2018-09-09 22:26:19 +03:00
Markus Mäkelä
26dfb19ea4
Make routingworker.hh public
Given that worker.hh was public, it made sense to make routingworker.hh
public as well. This removes the need to include private headers in
modules and allows C++ constructs to be used in C++ code when previously
only the C API was available.
2018-09-04 13:04:08 +03:00
Johan Wikman
3f53eddbde MXS-2020 Replace ss[_info]_dassert with mxb_assert[_message] 2018-08-22 11:34:59 +03:00
Johan Wikman
e0cb11151f MXS-2008 Move maxscale/worker.h to maxbase/worker.h 2018-08-20 11:15:14 +03:00
Johan Wikman
cf0aeed516 MXS-2014 Rename log_manager.h to log.h
There's nothing resembling a manager anymore.
2018-08-17 10:59:37 +03:00
Johan Wikman
f3f802cabe MXS-2008 Move maxscale/atomic.h to maxbase/atomic.h 2018-08-15 08:44:39 +03:00
Johan Wikman
2d1e91ebf4 MXS-2008 Remove MXS_WORKER_MSG_PING
No reason for including that in the worker interface.
2018-08-15 08:41:45 +03:00
Markus Mäkelä
39ce6c624f
MXS-2005: Remove unused code
Removed skygw_utils and relate files along with the old log manager
code. Also removed file flushing due to it being redundant; messages are
written to the file immediately. Adjusted tests to accommodate this
change.
2018-08-14 14:57:33 +03:00
Johan Wikman
fbd3b08c1e MXS-1992 Make preparations for REST-API 2018-08-08 09:16:19 +03:00
Markus Mäkelä
5d085f5cdf
MXS-1929: Remove service parameter setters
Removed the explicit setters for the service parameters. Not all of them
were implemented and they were only used internally. Moved the parameter
validation and update processing inside the Service class to reduce the
load on the other parts of the core.
2018-08-06 21:20:29 +03:00
Markus Mäkelä
4d3dbb2040
MXS-1929: Take SFilterDef into use
The service now uses a std::vector<SFilterDef> to store the filters it
uses. Most internal parts deal with the SFilterDef but debugcmd.cc still
moves raw pointers around (needs to be changed).
2018-08-06 21:20:29 +03:00
Johan Wikman
166ecfead6 MXS-1992 MaxAdmin uses RoutingWorker for QC stats 2018-08-03 07:33:12 +03:00
Johan Wikman
c302268ca3 MXS-1992 Provide maxadmin if for getting qc stats
- Equivalent functionality will be provided for maxctrl.
- Functionality for obtaining the data will be moved to RoutingWorker.
2018-08-03 07:33:12 +03:00
Markus Mäkelä
ec420332ea
MXS-1929: Take ResultSet into use
Replaced the previous RESULTSET with the new implementation. As the new
ResultSet doesn't have a JSON streaming capability, the MaxInfo JSON
interface has been removed. This should not be a big problem as the REST
API offers the same information in a more secure and structured way.
2018-07-31 22:50:08 +03:00
Markus Mäkelä
3be975ba5d
Fix fixing of std::string object names
Comparing two fixed std::strings would have equal C strings but comparing
with operator== they would be different. This was a result of the string
modification done by fix_object_name.

Converted the internal header into a C++ header, added std::string
overload and fixed use of the function.
2018-07-31 09:41:15 +03:00
Markus Mäkelä
cca7757090
MXS-1929: Take internal Service struct into use
The internals now mostly refer to the Service struct instead of the public
SERVICE struct.
2018-07-31 09:41:13 +03:00
Markus Mäkelä
829fdcff83
MXS-1929: Make filters fully opaque
The filter implementation is now fully hidden. Also converted it to a C++
struct allocated with new and stored the filters in a global list instead
of embedding the list in the object itself.
2018-07-31 09:41:13 +03:00
Markus Mäkelä
5fdf82a508
Only warn about whitespace in section names
The warnings were logged even when the fix_section_name function was used
to fix non-section names.
2018-07-17 11:52:15 +03:00
Markus Mäkelä
cbb8c68770
Remove router_options
Relaced router_options with configuration parameters in the createInstance
router entry point. The same needs to be done for the filter API as barely
any filters use the feature.

Some routers (binlogrouter) still support router_options but using it is
deprecated. This had to be done as their use wasn't deprecated in 2.2.
2018-07-11 14:08:56 +03:00
Markus Mäkelä
b320217212
Remove configuration reloading
Removed the deprecated configuration reloading code. Added a entry into
the release notes that states this and the fact that it was deprecated in
2.2.
2018-07-11 14:08:54 +03:00
Johan Wikman
cc0299aee6 Update change date of 2.3 2018-06-25 10:07:52 +03:00
Markus Mäkelä
bd6155b950
MXS-1914: Resolve symbols at link time
Enabled link time symbol resolution to administrative modules.
2018-06-18 12:58:51 +03:00
Markus Mäkelä
bbeaaa97b5
Merge branch '2.2' into develop 2018-06-13 23:18:52 +03:00
Markus Mäkelä
315738f279
Merge branch '2.1' into 2.2 2018-06-13 23:15:11 +03:00
Markus Mäkelä
53177c30de
Fix runtime listener creation
The number of arguments to createListener was incremented but the maximum
count was not. Also fixed the parameter types for createListener and
alterServer.
2018-06-13 23:13:16 +03:00
Markus Mäkelä
143882ddce
Merge branch '2.1' into 2.2 2018-06-13 21:04:49 +03:00
Markus Mäkelä
1ea7c65861
Fix runtime alteration of servers
The server runtime alteration was broken by commit
c850336199c3c19508a3d280fb7000291d66b80c when it increased the maximum
argument count of the `alter server` command to 14.
2018-06-13 14:29:28 +03:00
Markus Mäkelä
0627e8dc86
Resolve all symbols for routers at link time
The routers should not have undefied references. Exceptions to this are
the modules that use the maxscale_shutdown() function defined in
gateway.cc.
2018-06-12 19:40:34 +03:00
Markus Mäkelä
96ed651466
Merge branch '2.2' into develop 2018-06-11 11:28:36 +03:00
Markus Mäkelä
1a24f0a956
Merge branch '2.1' into 2.2 2018-06-11 10:36:57 +03:00
Markus Mäkelä
1e1734f42e
MXS-1910: Only require ssl_ca_cert for servers
Servers in MaxScale can encrypt the connections without client keys and
certificates. As keys and certificates are no longer required, the CA
certificate must always be initialized.
2018-06-09 00:15:48 +03:00
Markus Mäkelä
0d73530ff3
Merge branch '2.2' into develop 2018-06-08 11:30:55 +03:00
Markus Mäkelä
a7dd2127d6
Merge branch '2.1' into 2.2 2018-06-08 11:21:35 +03:00
Markus Mäkelä
c850336199
MXS-1907: Allow ssl_verify_peer_certificate when creating listener
When a listener is created at runtime or SSL is being enabled for an
already created listener, the ssl_verify_peer_certificate parameter can
now be defined.
2018-06-08 10:11:43 +03:00
Esa Korhonen
c039821467 MXS-1883 Maintenance is now the only user-modifiable bit for a monitored server
The request to turn maintenance off/on is a separate flag, although the actual
status is still contained in the status bitfield.
2018-05-30 10:09:15 +03:00
Esa Korhonen
12035289f4 Remove server authenticator options
Was unused. A warning is printed if the parameter is defined. Any value is ignored.
2018-05-08 14:18:00 +03:00
Johan Wikman
510eb7ec7c MXS-1848 Change monitorCamelCase to monitor_snake_case 2018-05-07 14:08:36 +03:00
Johan Wikman
1f6cc6db8a MXS-1840 Compile all routers as C++
Minimal changes, only what is needed in order to make it compile.
2018-05-07 14:06:22 +03:00
Esa Korhonen
5d010ff712 Cleanup SERVER struct
Removed one unused field. Rearranged others, clarified comments.
2018-04-27 10:48:56 +03:00
Johan Wikman
b36f6faa7e MXS-1754 Reintroduce maxscale::Worker
Worker is now the base class of all workers. It has a message
queue and can be run in a thread of its own, or in the calling
thread. Worker can not be used as such, but a concrete worker
class must be derived from it. Currently there is only one
concrete class RoutingWorker.

There is some overlapping in functionality between Worker and
RoutingWorker, as there is e.g. a need for broadcasting a
message to all routing workers, but not to other workers.

Currently other workers can not be created as the array for
holding the pointers to the workers is exactly as large as
there will be RoutingWorkers. That will be changed so that
the maximum number of threads is hardwired to some ridiculous
value such as 128. That's the first step in the path towards
a situation where the number of worker threads can be changed
at runtime.
2018-04-16 14:53:08 +03:00
Johan Wikman
099b976773 MXS-1646 Remove non-blocking/timed epoll_wait calls
Since a shutdown message will now be sent via the regular epoll route,
there is no need to regularily wake up from epoll in order to check
whether shutdown has been initiated, but we can simply wait in epoll_wait
until told to wake up.
2018-02-05 10:35:14 +02:00
Markus Mäkelä
91fc67b118 Automatically convert maxadmin arguments to new format
As the object name formatting is automated, so should the formatting of
object names in arguments. This also makes 2.2 backwards compatible with
2.1 commands.
2017-12-21 10:48:07 +02:00
Esa Korhonen
508ce3a703 MXS-1491: Failover can be executed manually
Also, renamed config setting "failover" to "auto_failover". Removed
setting "switchover" as it is now always enabled.
2017-12-04 09:41:00 +02:00
Markus Mäkelä
396b81f336 Fix in-source builds
The internal header directory conflicted with in-source builds causing a
build failure. This is fixed by renaming the internal header directory to
something other than maxscale.

The renaming pointed out a few problems in a couple of source files that
appeared to include internal headers when the headers were in fact public
headers.

Fixed maxctrl in-source builds by making the copying of the sources
optional.
2017-11-22 18:40:18 +02:00
Markus Mäkelä
3a78b716b8 Merge branch '2.2' into 2.2-mrm 2017-10-30 11:06:34 +02:00