You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by ru...@apache.org on 2017/08/02 01:23:49 UTC

[whimsy] branch master updated: warn if ASF::LDAP::HOSTS is out of date

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 <ru...@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" <co...@whimsical.apache.org>'].