Skip to content

Commit

Permalink
Add some logging for the monitoring functions
Browse files Browse the repository at this point in the history
  • Loading branch information
nhandler committed Sep 28, 2016
1 parent ca9e8c1 commit 9e1f196
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions paasta_tools/mesos_maintenance.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,10 +206,14 @@ def get_hosts_forgotten_draining():
:returns: a list of hostnames of hosts forgotten draining
"""
draining_hosts = get_draining_hosts()
log.debug("draining_hosts: %s" % draining_hosts)

hosts_past_maintenance_start = get_hosts_past_maintenance_start()
print("draining_hosts: %s" % draining_hosts)
print("hosts_past_maintenance_start: %s" % hosts_past_maintenance_start)
log.debug("hosts_past_maintenance_start: %s" % hosts_past_maintenance_start)

forgotten_draining = list(set(draining_hosts).intersection(hosts_past_maintenance_start))
log.debug("forgotten_draining: %s" % forgotten_draining)

return forgotten_draining


Expand All @@ -227,8 +231,14 @@ def get_hosts_forgotten_down():
:returns: a list of hostnames of hosts forgotten down
"""
down_hosts = get_down_hosts()
log.debug("down_hosts: %s" % down_hosts)

hosts_past_maintenance_end = get_hosts_past_maintenance_end()
log.debug("hosts_past_maintenance_end: %s" % hosts_past_maintenance_end)

forgotten_down = list(set(down_hosts).intersection(hosts_past_maintenance_end))
log.debug("forgotten_down: %s" % forgotten_down)

return forgotten_down


Expand Down

0 comments on commit 9e1f196

Please sign in to comment.