[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [doctor/master] Don't alarm for BadExit being out of sync with new relays



commit 9ebead8ccc16955ffa8fd0c24c53adc9b6570185
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date:   Wed Feb 24 09:23:45 2016 -0800

    Don't alarm for BadExit being out of sync with new relays
    
    Each consensus has a lot of churn and it's normal for relays to be out of sync
    initially. Only send BadExit sync notifications once a relay's been around for
    a while.
---
 consensus_health_checker.py | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/consensus_health_checker.py b/consensus_health_checker.py
index b0efb5c..be06cf9 100755
--- a/consensus_health_checker.py
+++ b/consensus_health_checker.py
@@ -673,6 +673,15 @@ def bad_exits_in_sync(latest_consensus, consensuses, votes):
       else:
         not_in_consensus.append(authority)
 
+    # If this relay's missing from a consensus and has been active for less
+    # than an hour then don't bother. It gets negligable traffic and is likely
+    # part of normal network churn.
+
+    desc = votes[with_flag[0]].routers[fingerprint]
+
+    if not_in_consensus and (datetime.datetime.now() - desc.published).total_seconds() > 3600:
+      continue
+
     attr = ['with flag: %s' % ', '.join(with_flag)]
 
     if without_flag:

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits