14 Commits

Author SHA1 Message Date
Johan Wikman
fdfbf3e133 Update 2.4.3 change date 2019-11-05 12:21:00 +02:00
Johan Wikman
0ba779d5a2 Update 2.4.0 Change Date 2019-06-25 10:11:55 +03:00
Johan Wikman
8fa8181009 MXS-2540 Use new conf. mech. in Clustrix monitor 2019-06-05 11:10:28 +03:00
Markus Mäkelä
418ccf861d
Format routers and monitors 2019-05-10 10:31:12 +03:00
Johan Wikman
893059c537 MXS-2424 Use persisted nodes if bootstrap node missing
At runtime the Clustrix monitor will save to an sqlite3
database information about detected nodes and delete that
information if a node disappears.

At startup, if the monitor fails to connect to a bootstrap
node, it will try to connect any of the persisted nodes and
start from there.

This means that in general it is sufficient if the Clustrix
monitor at the very first startup can connect to a bootstrap
node; thereafter it will get by even if the bootstrap node
would disappear for good.
2019-04-12 16:29:21 +03:00
Johan Wikman
c422aafe1d MXS-2424 Refactor for further changes
In subsequent change(s) persisted node information will be used
as a last resort to connect to a Clustrix node.
2019-04-12 16:29:21 +03:00
Johan Wikman
84bf241dd1 MXS-2339 A running Clustrix node is regarded as master
In this context master should be interpreted as "can be read
and written to".

Marking them as master requires less changes in RWS to make it
usable with a Clustrix cluster.
2019-04-02 08:13:50 +03:00
Esa Korhonen
6b14479b6c MXS-2271 Rename MXS_MONITORED_SERVER to MonitorServer 2019-03-19 13:32:38 +02:00
Esa Korhonen
14b4fa632a MXS-2271 Move Monitor inside maxscale-namespace
Rearranged monitor.cc by namespace.
2019-03-15 12:57:35 +02:00
Johan Wikman
55b1e031d6 MXS-2275 Fix breakage due to rebasing 2019-02-01 11:00:53 +02:00
Esa Korhonen
0903648542 MXS-2271 Move connection settings inside settings struct
Since the settings are now protected fields, all related functions were
moved inside the monitor class. mon_ping_or_connect_to_db() is now a method
of MXS_MONITORED_SERVER. The connection settings class is defined inside the
server since that is the class actually using the settings.
2019-01-31 17:00:47 +02:00
Johan Wikman
92b27500c7 MXS-2276 Fix things due to MXS_MONITOR -> Monitor change 2019-01-25 10:30:27 +02:00
Johan Wikman
42b3402a71 MXS-2276 Use dynamic servers also for cluster check
Once the monitor has been able to connect to a clustrix node
and obtain the clustrix nodes, it'll primarily use those nodes
when looking for a Clustrix node to be used as the "hub".
With this change it is sufficient (but perhaps unwise) to provide
a single node boostrap node in the configuration file.

Some other rearrangements and renamings of functions has also been
made.
2019-01-25 10:30:27 +02:00
Johan Wikman
6b556859ce MXS-2219 Use system.membership as primary table
From system.membership we can find out what server exist in the
cluster while system.nodeinfo contains information about those
servers. If a node goes down, it will disappear from system.nodeinfo,
but not from system.membership. Consequently, we must start from
system.membership and then fetch more information from system.nodeinfo.

Incidentally, a query like

    SELECT ms.nid, ni.iface_ip
    FROM system.membership AS ms
        LEFT JOIN system.nodeinfo AS ni ON ms.nid=ni.nodeid;

should provide all information in one go, but it seems that such joins
are not supported on the system tables.
2019-01-21 15:41:55 +02:00