whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ru...@apache.org
Subject [whimsy] branch master updated: warn if ASF::LDAP::HOSTS is out of date
Date Wed, 02 Aug 2017 01:23:49 GMT
This is an automated email from the ASF dual-hosted git repository.

rubys pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git


The following commit(s) were added to refs/heads/master by this push:
     new 253cfb6  warn if ASF::LDAP::HOSTS is out of date
253cfb6 is described below

commit 253cfb6068d3fee4b851f97ec00966a088be1762
Author: Sam Ruby <rubys@intertwingly.net>
AuthorDate: Tue Aug 1 21:23:35 2017 -0400

    warn if ASF::LDAP::HOSTS is out of date
---
 www/status/monitors/system.rb | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/www/status/monitors/system.rb b/www/status/monitors/system.rb
index bb5c320..9da76f4 100644
--- a/www/status/monitors/system.rb
+++ b/www/status/monitors/system.rb
@@ -54,6 +54,16 @@ def Monitor.system(previous_status)
   status[name] = {level: master == true ? 'success' : 'warning',
                   data: master.to_s}
 
+  # Is ASF::LDAP.hosts up to date?
+  require_relative '../../../lib/whimsy/asf'
+  name = :ldap
+  pls = ASF::LDAP.puppet_ldapservers.sort
+  hosts = ASF::LDAP::HOSTS.sort
+  diff = (pls-hosts).map {|host| "+#{host}"}
+  diff += (hosts-pls).map {|host| "-#{host}"}
+  status[name] = {level: diff.empty? ? 'success' : 'warning',
+                  data: diff.join(' ')}
+
   {data: status}
 end
 

-- 
To stop receiving notification emails like this one, please contact
['"commits@whimsical.apache.org" <commits@whimsical.apache.org>'].

Mime
View raw message