f3fbb297a4 
					 
					
						
						
							
							MXS-1937 Enable server events on new master during switchover and failover  
						
						... 
						
						
						
						Combined some of the shared code in enable/disable_events(). Also disables
events on a joining standalone server. 
						
						
					 
					
						2018-09-05 15:54:08 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						7e6ce2d13f 
					 
					
						
						
							
							MXS-1937 Disable server events on master during switchover  
						
						... 
						
						
						
						The feature is behind a config setting. 
						
						
					 
					
						2018-09-05 15:54:08 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						7cd1cfdb80 
					 
					
						
						
							
							Relay log waiting is part of failover_prepare  
						
						... 
						
						
						
						Since the servers are not modified before or during the wait, the waiting
can be done in the preparation method. This simplifies the actual failover
somewhat, and allows the monitor to keep running normally while waiting for
the log to clear. 
						
						
					 
					
						2018-08-30 17:07:34 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						c39177bc8d 
					 
					
						
						
							
							Relay log clear supports multiple slave connections  
						
						... 
						
						
						
						Now waits for the relay log of the correct slave connection. 
						
						
					 
					
						2018-08-29 17:07:52 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						85d8a85cde 
					 
					
						
						
							
							Update master failure detection from slaves  
						
						... 
						
						
						
						The detection now works with multiple slave connections. 
						
						
					 
					
						2018-08-29 17:07:52 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						9e566bc619 
					 
					
						
						
							
							A master that is down with no running slaves can be replaced  
						
						... 
						
						
						
						This should be a more general way to detect situations where a DBA
or another MaxScale performs a failover. 
						
						
					 
					
						2018-08-29 16:41:20 +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 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						f2dfd39f79 
					 
					
						
						
							
							Clean up JSON diagnostics  
						
						... 
						
						
						
						Now prints all slave connections. 
						
						
					 
					
						2018-08-22 12:23:28 +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 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						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 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						1c508cd413 
					 
					
						
						
							
							MXS-2012 Read and print Seconds_Behind_Master  
						
						... 
						
						
						
						Replaces the old replication lag detection. 
						
						
					 
					
						2018-08-21 11:51:10 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						681c456bd7 
					 
					
						
						
							
							Separate unknown server version from old versions  
						
						... 
						
						
						
						This allows better failover support detection. 
						
						
					 
					
						2018-08-13 11:30:21 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						b7c94abb34 
					 
					
						
						
							
							Keep track of previously observed slave connections  
						
						... 
						
						
						
						This reduces the ambiguity of server id:s in the slave status contents.
If a slave connection has been seen properly connected at an earlier time,
it can be trusted to report the correct master server id. This also
fixes some wrong status assignment edge cases with the SERVER_WAS_SLAVE-bit.
The bit will be removed in a later commit.
Even this does not solve the situation when MaxScale is started with
some servers down. 
						
						
					 
					
						2018-08-09 20:39:19 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						17c84a22c7 
					 
					
						
						
							
							Refactor preparations to failover  
						
						... 
						
						
						
						The two operations are quite similar so the code should look
similar as well and use shared functions. 
						
						
					 
					
						2018-08-07 16:33:56 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						0a81f78442 
					 
					
						
						
							
							Use unique pointer instead of auto-pointer  
						
						
						
						
					 
					
						2018-08-06 13:24:05 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						c0bd5ca3a1 
					 
					
						
						
							
							MXS-1905 Switchover if master is low on disk space  
						
						... 
						
						
						
						Required quite a bit of refactoring. 
						
						
					 
					
						2018-08-06 13:24:05 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						1e33ab69f2 
					 
					
						
						
							
							Rename server_is_running() to server_is_usable()  
						
						... 
						
						
						
						The previous name was misleading. The new server_is_running() only
checks for the running bit so that a server is always either running
or down. 
						
						
					 
					
						2018-07-31 14:53:56 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						c9570ff616 
					 
					
						
						
							
							Check failover applicability to the cluster every turn  
						
						... 
						
						
						
						This should give an advance warning if a user tries to activate auto_failover
on a cluster which does not support it. 
						
						
					 
					
						2018-07-20 15:33:47 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						936bcde135 
					 
					
						
						
							
							Remove old "detect_standalone_master"-feature, update documentation  
						
						... 
						
						
						
						The auto_failover is a more reliable solution and should be used instead. Several
unused parameters were removed, although they can still be defined in the config
file. Updated documentation on the relevant parts. 
						
						
					 
					
						2018-07-16 15:58:16 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						77a1417479 
					 
					
						
						
							
							Replace TR1 headers with standard headers  
						
						... 
						
						
						
						Now that the C++11 standard is the default one, we can remove the TR1
headers and classes. 
						
						
					 
					
						2018-07-11 14:08:46 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						6bf10904d7 
					 
					
						
						
							
							MXS-1845 Only rebuild topology when required  
						
						... 
						
						
						
						The monitor now detects when a server has changed such that a replication
graph rebuild is needed and only then rebuilds the graph and detects
cycles and master.
Also, some old code is no longer called in the monitor cycle. It will be
removed in later commits. Refactored some of the related functions. 
						
						
					 
					
						2018-06-28 16:56:41 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						cc0299aee6 
					 
					
						
						
							
							Update change date of 2.3  
						
						
						
						
					 
					
						2018-06-25 10:07:52 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						8bd9e1d473 
					 
					
						
						
							
							Check monitor permissions when reconnecting to server  
						
						... 
						
						
						
						Previously, the permissions would only be checked at monitor start.
Now, the permissions are checked if [Auth Error] is on or server
was reconnected. 
						
						
					 
					
						2018-06-20 17:54:46 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						019d62bbb8 
					 
					
						
						
							
							MXS-1886 Better auto-rejoin error description and tolerance  
						
						... 
						
						
						
						Contains changes from commit 09df01752812444c6e7c409a8957d292f7de63cf
adapted to the 2.3 branch. 
						
						
					 
					
						2018-06-18 16:35:28 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						d3e9cc9a4f 
					 
					
						
						
							
							MXS-1886 Auto-failover error tolerance  
						
						... 
						
						
						
						Contains changes from commit 9e68d8ec3ddf1621f533067021c4b3042f695e80
adapted to the 2.3 branch. 
						
						
					 
					
						2018-06-18 16:35:28 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						2f987d0b10 
					 
					
						
						
							
							MXS-1845 Only select a master if current master is no longer usable  
						
						... 
						
						
						
						The purpose is to make the selected master server sticky. The master is reselected only
if the current master is no longer a valid master. 
						
						
					 
					
						2018-06-18 11:06:58 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						5324a1bdaa 
					 
					
						
						
							
							MXS-1845 Assign server roles  
						
						... 
						
						
						
						Assign server roles (master, slave, relay master, slave of external master)
for a graph with possibly multiple paths to a slave server. 
						
						
					 
					
						2018-06-13 17:38:53 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						3f82c25c62 
					 
					
						
						
							
							MXS-1845 New algorithm for finding the master server  
						
						... 
						
						
						
						Not yet used, as more is needed to replace the old code. The
algorithm is based on counting the total number of slave nodes
a server has, possibly in multiple layers and/or cycles. 
						
						
					 
					
						2018-06-13 17:38:33 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						2481de260f 
					 
					
						
						
							
							Move monitor-dependent code in MariaDBServer to MariaDBMonitor  
						
						... 
						
						
						
						Removes Monitor-dependency from the MariaDBServer-class. 
						
						
					 
					
						2018-06-06 22:28:38 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						f600b3a769 
					 
					
						
						
							
							MXS-1775 Check disk space in MariaDBMonitor  
						
						
						
						
					 
					
						2018-06-06 15:25:57 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						4d7aff4ab9 
					 
					
						
						
							
							MXS-1845 Find strongly connected components with multiple slave connections  
						
						... 
						
						
						
						Rewrote the algorithm for clarity. 
						
						
					 
					
						2018-06-01 14:04:50 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						3ec449339f 
					 
					
						
						
							
							Only write to SERVER->status at the end of a monitoring loop  
						
						... 
						
						
						
						This makes the code clearer and reduces race conditions, as the monitor
could be writing SERVER->status while a router is reading it. Also,
the time during which the SERVER struct is locked drops to a fraction. 
						
						
					 
					
						2018-05-23 16:19:08 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						a31549221b 
					 
					
						
						
							
							MXS-1845 Print all slave connections at 'show monitors'  
						
						... 
						
						
						
						The format has changed. 
						
						
					 
					
						2018-05-18 13:48:08 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						45da5a08d9 
					 
					
						
						
							
							MXS-1845 Cleanup monitor backend updating  
						
						... 
						
						
						
						Now detects errors and prints them. 
						
						
					 
					
						2018-05-18 13:48:08 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						b71710e066 
					 
					
						
						
							
							MXS-1865 Combine server version and type  
						
						... 
						
						
						
						Binlog server is now handled better. 
						
						
					 
					
						2018-05-16 13:55:45 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						b29bae6e84 
					 
					
						
						
							
							MXS-1865 Update server version only when (re)connecting  
						
						... 
						
						
						
						Updating it every iteration is needless. 
						
						
					 
					
						2018-05-16 13:55:45 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						b92284afc4 
					 
					
						
						
							
							Move server querying to MariaDBServer  
						
						... 
						
						
						
						The query functions still require the base monitor struct because of
mon_ping_or_connect_to_db(). 
						
						
					 
					
						2018-05-14 11:11:08 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						ba4700a983 
					 
					
						
						
							
							MXS-1745 Remove unused fields  
						
						... 
						
						
						
						The binlog file and position are no longer used. Gtid_IO_Pos can fulfill
the same purpose if needed. 
						
						
					 
					
						2018-04-27 10:48:56 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						de1e299f3f 
					 
					
						
						
							
							MXS-1745 Save all rows from SHOW ALL SLAVES STATUS  
						
						... 
						
						
						
						The master down verification through slaves won't work with this commit. It needs to be
redesigned to handle multiple slave connections or removed. Also, only the first row of
slave status data is used by the monitor, so multiple slave connections are still
incorrectly handled. 
						
						
					 
					
						2018-04-27 10:48:45 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						7c933df56f 
					 
					
						
						
							
							MXS-1703 Remove support for MariaDB/MySQL versions less than 5.5  
						
						... 
						
						
						
						5.1 to 5.3 are officially not supported anymore, so support can be removed from
the monitor. This allows removing the config parameter "mysql51_replication". 
						
						
					 
					
						2018-04-26 10:47:57 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						8e3bec5d09 
					 
					
						
						
							
							MXS-1703 Rename fields in SlaveStatus  
						
						... 
						
						
						
						Althought the fields are still public, having the 'm_' is clearer. 
						
						
					 
					
						2018-04-26 10:47:57 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						a28aac8de0 
					 
					
						
						
							
							MXS-1703 Cleanup do_show_slave_status()  
						
						... 
						
						
						
						Slave_IO_Running is now properly parsed. Renamed class to SlaveStatus. 
						
						
					 
					
						2018-04-26 10:47:57 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						caa964fa57 
					 
					
						
						
							
							Merge branch '2.2' into develop  
						
						
						
						
					 
					
						2018-04-24 13:57:50 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						289f4990d6 
					 
					
						
						
							
							Merge branch '2.2' into develop  
						
						
						
						
					 
					
						2018-04-23 11:48:38 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						02c57c98e4 
					 
					
						
						
							
							MXS-1703 Move more methods to MariaDBServer  
						
						... 
						
						
						
						These methods only modify or update a single server. 
						
						
					 
					
						2018-04-18 10:27:16 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						50bc43e4bf 
					 
					
						
						
							
							MXS-1703 Move server-specific diagnostic printing to MariaDBServer  
						
						
						
						
					 
					
						2018-04-18 10:27:16 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						4d6239635e 
					 
					
						
						
							
							MXS-1703 Add and use convenience functions for common macros/fields  
						
						... 
						
						
						
						Also add debug assert to MariaDBServer ctor. 
						
						
					 
					
						2018-04-13 13:31:12 +03:00 
						 
				 
			
				
					
						
					 
					
						
						
							
						
						b6e421e13b 
					 
					
						
						
							
							MXS-1703 Use a common header for all mariadbmon files  
						
						... 
						
						
						
						The mariadb_common.hh file is now a header with only common definitions
such as module name. The QueryResult-class was moved to MariaDBServer. 
						
						
					 
					
						2018-04-12 13:06:36 +03:00