commit 30540279d0105b056b7f6415298d35887c4ca215 Author: Damian Johnson atagar@torproject.org Date: Sat Aug 30 13:47:15 2014 -0700
Notice if too many relays are unmeasured by bandwidth authorities
Adding a notice when bandwidth authorities lack an opinion on over 10% of the relays...
NOTICE: As a bandwidth authority maatuska lacked a measurement for 1038 of 7418 relays (13%) NOTICE: As a bandwidth authority tor26 lacked a measurement for 1764 of 7418 relays (23%) NOTICE: As a bandwidth authority gabelmoo lacked a measurement for 1361 of 7266 relays (18%)
This is disabled for now since the bandwidth authorities are presently having issues. This is for...
https://trac.torproject.org/projects/tor/ticket/12989 --- consensus_health_checker.py | 24 ++++++++++++++++++++++++ data/consensus_health.cfg | 1 + 2 files changed, 25 insertions(+)
diff --git a/consensus_health_checker.py b/consensus_health_checker.py index df827fb..fde03aa 100755 --- a/consensus_health_checker.py +++ b/consensus_health_checker.py @@ -233,6 +233,8 @@ def run_checks(consensuses, votes): consensuses_have_same_votes, has_all_signatures, voting_bandwidth_scanners, + # TODO: enable when the bandwidth scanners are fixed (#12989) + #unmeasured_relays, has_authority_flag, is_recommended_versions, bad_exits_in_sync, @@ -473,6 +475,28 @@ def voting_bandwidth_scanners(latest_consensus, consensuses, votes): return issues
+def unmeasured_relays(latest_consensus, consensuses, votes): + "Checks that the bandwidth authorities have all formed an opinion about at least 90% of the relays." + + issues = [] + + for authority, vote in votes.items(): + if authority in CONFIG['bandwidth_authorities']: + unmeasured = 0 + + for desc in vote.routers.values(): + if not desc.measured: + unmeasured += 1 + + total = len(vote.routers) + percentage = 100 * unmeasured / total + + if percentage >= 10: + issues.append(Issue(Runlevel.NOTICE, 'TOO_MANY_UNMEASURED_RELAYS', authority = authority, unmeasured = unmeasured, total = total, percentage = percentage)) + + return issues + + def has_authority_flag(latest_consensus, consensuses, votes): "Checks that the authorities have the 'authority' flag in the present consensus."
diff --git a/data/consensus_health.cfg b/data/consensus_health.cfg index af7c200..8f25fb4 100644 --- a/data/consensus_health.cfg +++ b/data/consensus_health.cfg @@ -9,6 +9,7 @@ msg CERTIFICATE_ABOUT_TO_EXPIRE => The certificate of the following directory au msg MISSING_SIGNATURE => Consensus fetched from {consensus_of} was missing the following authority signatures: {authorities} msg MISSING_BANDWIDTH_SCANNERS => The following directory authorities are not reporting bandwidth scanner results: {authorities} msg EXTRA_BANDWIDTH_SCANNERS => The following directory authorities were not expected to report bandwidth scanner results: {authorities} +msg TOO_MANY_UNMEASURED_RELAYS => As a bandwidth authority {authority} lacked a measurement for {unmeasured} of {total} relays ({percentage}%) msg MISSING_VOTES => The consensuses downloaded from the following authorities are missing votes that are contained in consensuses downloaded from other authorities: {authorities} msg MISSING_AUTHORITIES => The following authorities are missing from the consensus: {authorities} msg EXTRA_AUTHORITIES => The following authorities were not expected in the consensus: {authorities}
tor-commits@lists.torproject.org