Faidon has submitted this change and it was merged.
Change subject: Fix replication checks
......................................................................
Fix replication checks
Change-Id: Ic0ebdf99ad754d1b881852b7964497c29a045f0a
---
M files/nagios/check_solr
M manifests/role/solr.pp
2 files changed, 4 insertions(+), 6 deletions(-)
Approvals:
Faidon: Looks good to me, approved
jenkins-bot: Verified
diff --git a/files/nagios/check_solr b/files/nagios/check_solr
index cab3499..adb9041 100755
--- a/files/nagios/check_solr
+++ b/files/nagios/check_solr
@@ -134,8 +134,7 @@
check_replication()
except urllib2.URLError as ex:
- (e, ) = ex.args
- if e.errno == 115:
+ if len(ex.args) > 0 and ex.args[0].errno == 115:
msg = 'Request timeout after %ds' % cmd_options.timeout
else:
msg = format_exception(ex)
diff --git a/manifests/role/solr.pp b/manifests/role/solr.pp
index f18579a..3c04e49 100644
--- a/manifests/role/solr.pp
+++ b/manifests/role/solr.pp
@@ -12,10 +12,9 @@
replication_master => $replication_master,
}
- if ($replication_master) {
- $check_command = "check_solr"
- } else {
- $check_command = "check_replicated_solr"
+ $check_command = $replication_master ? {
+ undef => "check_solr",
+ default => "check_replicated_solr"
}
monitor_service { "Solr":
description => "Solr",
--
To view, visit https://gerrit.wikimedia.org/r/50829
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ic0ebdf99ad754d1b881852b7964497c29a045f0a
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: MaxSem <[email protected]>
Gerrit-Reviewer: Faidon <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits