[icinga-checkins] icinga.org: icinga2/master: Improve HA support for the IDO check task

git at icinga.org git at icinga.org
Sun Aug 14 20:17:41 CEST 2016


Module: icinga2
Branch: master
Commit: 005e0f532fbfdcfb813e3cf055ae37b009858484
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=005e0f532fbfdcfb813e3cf055ae37b009858484

Author: Gunnar Beutner <gunnar.beutner at netways.de>
Date:   Sun Aug 14 20:17:14 2016 +0200

Improve HA support for the IDO check task

fixes #12430

---

 lib/db_ido/idochecktask.cpp |    7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/lib/db_ido/idochecktask.cpp b/lib/db_ido/idochecktask.cpp
index 049928e..987dc32 100644
--- a/lib/db_ido/idochecktask.cpp
+++ b/lib/db_ido/idochecktask.cpp
@@ -98,6 +98,13 @@ void IdoCheckTask::ScriptFunc(const Checkable::Ptr& checkable, const CheckResult
 
 	double qps = conn->GetQueryCount(60) / 60.0;
 
+	if (conn->IsPaused()) {
+		cr->SetOutput("IDO connection is temporarily disabled on this cluster instance.");
+		cr->SetState(ServiceOK);
+		checkable->ProcessCheckResult(cr);
+		return;
+	}
+
 	if (!conn->GetConnected()) {
 		if (conn->GetShouldConnect()) {
 			cr->SetOutput("Could not connect to the database server.");



More information about the icinga-checkins mailing list