From bf5f80b13bb09e26a0c09653e5f16ec5ff1b175e Mon Sep 17 00:00:00 2001 From: Johan Wikman Date: Mon, 25 Mar 2019 13:56:39 +0200 Subject: [PATCH] Fix ClustrixMonitor The cluster check can only be made after the monitor has been started. If done when monitor is configured it will at startup be done when services are not yet available and hence they will not be populated with the dynamically discovered servers. --- server/modules/monitor/clustrixmon/clustrixmonitor.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/server/modules/monitor/clustrixmon/clustrixmonitor.cc b/server/modules/monitor/clustrixmon/clustrixmonitor.cc index 37558780a..d2244cd4e 100644 --- a/server/modules/monitor/clustrixmon/clustrixmonitor.cc +++ b/server/modules/monitor/clustrixmon/clustrixmonitor.cc @@ -67,10 +67,6 @@ bool ClustrixMonitor::configure(const MXS_CONFIG_PARAMETER* pParams) m_config.set_cluster_monitor_interval(pParams->get_integer(CLUSTER_MONITOR_INTERVAL_NAME)); m_config.set_health_check_threshold(pParams->get_integer(HEALTH_CHECK_THRESHOLD_NAME)); - // At startup we accept softfailed nodes in an attempt to be able to - // connect at any cost. It'll be replaced once there is an alternative. - check_cluster(Clustrix::Softfailed::ACCEPT); - return true; } @@ -141,6 +137,10 @@ void ClustrixMonitor::server_removed(SERVER* pServer) void ClustrixMonitor::pre_loop() { + // At startup we accept softfailed nodes in an attempt to be able to + // connect at any cost. It'll be replaced once there is an alternative. + check_cluster(Clustrix::Softfailed::ACCEPT); + make_health_check(); }