Commit e4e2b437 authored by Damian Johnson's avatar Damian Johnson Committed by Georg Koppen
Browse files

Expand DIRAUTH_SKIP_CHECKS suppressions

DIRAUTH_SKIP_CHECKS prevented us from downloading (and by extension checking)
a dirauth's consensus documents, but it did not suppress other checks (presence
in votes, ORPort reachability, etc). This expands the suppression to cover
everything that references the DIRECTORY_AUTHORITIES global, which should
hopefully be everything.

------------------------------------------------------------
DocTor Output Before
------------------------------------------------------------

WARNING: moria1 is missing the server descriptor of dannenberg
WARNING: moria1 is missing the server descriptor of Faravahar
WARNING: dizum is missing the server descriptor of dannenberg
WARNING: dizum is missing the server descriptor of Faravahar
WARNING: gabelmoo is missing the server descriptor of dannenberg
WARNING: gabelmoo is missing the server descriptor of Faravahar
WARNING: maatuska is missing the server descriptor of dannenberg
WARNING: maatuska is missing the server descriptor of Faravahar
WARNING: Faravahar is missing the server descriptor of dannenberg
WARNING: longclaw is missing the server descriptor of dannenberg
WARNING: longclaw is missing the server descriptor of Faravahar
WARNING: bastet is missing the server descriptor of dannenberg
WARNING: bastet is missing the server descriptor of Faravahar
WARNING: The following directory authorities do not support the consensus method that the consensus uses: Faravahar
NOTICE: Consensus fetched from dizum was missing the following authority signatures: dannenberg, Faravahar
NOTICE: Consensus fetched from gabelmoo was missing the following authority signatures: dannenberg, Faravahar
NOTICE: Consensus fetched from maatuska was missing the following authority signatures: dannenberg, Faravahar
NOTICE: Consensus fetched from Faravahar was missing the following authority signatures: dannenberg, Faravahar
NOTICE: Consensus fetched from longclaw was missing the following authority signatures: dannenberg, Faravahar
NOTICE: Consensus fetched from bastet was missing the following authority signatures: dannenberg, Faravahar
NOTICE: The following directory authorities are not reporting bandwidth scanner results: Faravahar
WARNING: The following authorities are missing from the consensus: dannenberg, Faravahar
NOTICE: Authorities disagree about the BadExit flag for 867982ADCFBE55EC1C00A5B34C8991FF87605906 (with flag: longclaw, gabelmoo, moria1, without flag: Faravahar)
NOTICE: Authorities disagree about the BadExit flag for B9324F1BEDB1DF62AEE219B0CC41507CE710BA3C (with flag: longclaw, gabelmoo, moria1, without flag: Faravahar)
NOTICE: Authorities disagree about the BadExit flag for 81F59E8936D0B2105182E4B8200AC07D9274961F (with flag: longclaw, gabelmoo, moria1, without flag: Faravahar)
NOTICE: Authorities disagree about the BadExit flag for 8A3606F17B1DDAC4F8BFA0C99E656FFA11CC747D (with flag: longclaw, gabelmoo, moria1, without flag: Faravahar)
NOTICE: Authorities disagree about the BadExit flag for 35449EB3D025CC24601FB43884F9699367D677CF (with flag: longclaw, gabelmoo, without flag: Faravahar, moria1)

------------------------------------------------------------
DocTor Output After
------------------------------------------------------------

WARNING: moria1 is missing the server descriptor of Faravahar
WARNING: dizum is missing the server descriptor of Faravahar
WARNING: gabelmoo is missing the server descriptor of Faravahar
WARNING: maatuska is missing the server descriptor of Faravahar
WARNING: longclaw is missing the server descriptor of Faravahar
WARNING: bastet is missing the server descriptor of Faravahar
WARNING: The following directory authorities do not support the consensus method that the consensus uses: Faravahar
NOTICE: Consensus fetched from moria1 was missing the following authority signatures: Faravahar
NOTICE: Consensus fetched from dizum was missing the following authority signatures: Faravahar
NOTICE: Consensus fetched from gabelmoo was missing the following authority signatures: Faravahar
NOTICE: Consensus fetched from maatuska was missing the following authority signatures: Faravahar
NOTICE: Consensus fetched from Faravahar was missing the following authority signatures: Faravahar
NOTICE: Consensus fetched from longclaw was missing the following authority signatures: Faravahar
NOTICE: Consensus fetched from bastet was missing the following authority signatures: Faravahar
NOTICE: The following directory authorities are not reporting bandwidth scanner results: Faravahar
WARNING: The following authorities are missing from the consensus: Faravahar
NOTICE: Authorities disagree about the BadExit flag for 81F59E8936D0B2105182E4B8200AC07D9274961F (with flag: gabelmoo, moria1, longclaw, without flag: Faravahar)
NOTICE: Authorities disagree about the BadExit flag for 35449EB3D025CC24601FB43884F9699367D677CF (with flag: gabelmoo, longclaw, without flag: Faravahar, moria1)
NOTICE: Authorities disagree about the BadExit flag for B9324F1BEDB1DF62AEE219B0CC41507CE710BA3C (with flag: gabelmoo, moria1, longclaw, without flag: Faravahar)
NOTICE: Authorities disagree about the BadExit flag for 8A3606F17B1DDAC4F8BFA0C99E656FFA11CC747D (with flag: gabelmoo, moria1, longclaw, without flag: Faravahar)
NOTICE: Authorities disagree about the BadExit flag for 867982ADCFBE55EC1C00A5B34C8991FF87605906 (with flag: gabelmoo, moria1, longclaw, without flag: Faravahar)
parent 5360a213
......@@ -399,6 +399,9 @@ def missing_authority_descriptor(latest_consensus, consensuses, votes):
for authority, vote in list(votes.items()):
for peer in list(DIRECTORY_AUTHORITIES.values()):
if peer.nickname in DIRAUTH_SKIP_CHECKS:
continue
if peer.fingerprint not in vote.routers:
issues.append(Issue(Runlevel.WARNING, 'MISSING_AUTHORITY_DESC', authority = authority, peer = peer.nickname, to = authority))
......@@ -568,7 +571,8 @@ def has_all_signatures(latest_consensus, consensuses, votes):
missing_authority = authority.nickname
break
missing_authorities.add(missing_authority)
if missing_authority not in DIRAUTH_SKIP_CHECKS:
missing_authorities.add(missing_authority)
if missing_authorities:
issues.append(Issue(Runlevel.NOTICE, 'MISSING_SIGNATURE', consensus_of = consensus_of, authorities = ', '.join(missing_authorities), to = missing_authorities))
......@@ -589,9 +593,10 @@ def voting_bandwidth_scanners(latest_consensus, consensuses, votes):
contains_measured_bandwidth = True
break
if DIRECTORY_AUTHORITIES[authority].nickname in BANDWIDTH_AUTHORITIES and not contains_measured_bandwidth:
if authority in BANDWIDTH_AUTHORITIES and not contains_measured_bandwidth:
missing_authorities.append(authority)
if not DIRECTORY_AUTHORITIES[authority].nickname in BANDWIDTH_AUTHORITIES and contains_measured_bandwidth:
if authority not in BANDWIDTH_AUTHORITIES and contains_measured_bandwidth:
extra_authorities.append(authority)
issues = []
......@@ -613,7 +618,7 @@ def unmeasured_relays(latest_consensus, consensuses, votes):
consensus_fingerprints = set([desc.fingerprint for desc in list(latest_consensus.routers.values())])
for authority, vote in list(votes.items()):
if DIRECTORY_AUTHORITIES[authority].nickname in BANDWIDTH_AUTHORITIES:
if authority in BANDWIDTH_AUTHORITIES:
measured, unmeasured = 0, 0
for desc in list(vote.routers.values()):
......@@ -642,7 +647,7 @@ def has_authority_flag(latest_consensus, consensuses, votes):
seen_authorities.add(desc.nickname)
known_authorities = set(DIRECTORY_AUTHORITIES.keys())
missing_authorities = known_authorities.difference(seen_authorities)
missing_authorities = known_authorities.difference(seen_authorities).difference(set(DIRAUTH_SKIP_CHECKS))
extra_authorities = seen_authorities.difference(known_authorities)
issues = []
......@@ -697,6 +702,9 @@ def has_expected_fingerprints(latest_consensus, consensuses, votes):
issues = []
for desc in list(latest_consensus.routers.values()):
if desc.nickname in DIRAUTH_SKIP_CHECKS:
continue
if desc.nickname in DIRECTORY_AUTHORITIES and Flag.NAMED in desc.flags:
expected_fingerprint = DIRECTORY_AUTHORITIES[desc.nickname].fingerprint
......@@ -713,6 +721,9 @@ def is_recommended_versions(latest_consensus, consensuses, votes):
min_version = min(latest_consensus.server_versions)
for authority in list(DIRECTORY_AUTHORITIES.values()):
if authority.nickname in DIRAUTH_SKIP_CHECKS:
continue
desc = latest_consensus.routers.get(authority.fingerprint)
if desc and desc.version and desc.version < min_version:
......@@ -818,6 +829,9 @@ def is_orport_reachable(latest_consensus, consensuses, votes):
issues = []
for authority in list(DIRECTORY_AUTHORITIES.values()):
if authority.nickname in DIRAUTH_SKIP_CHECKS:
continue
desc = latest_consensus.routers.get(authority.fingerprint)
if not desc:
......@@ -945,7 +959,7 @@ def get_consensuses():
"""
Provides a mapping of directory authority nicknames to their present consensus.
:returns: tuple of the form ({authority => consensus}, issues)
:returns: tuple of the form ({authority nickname => consensus}, issues)
"""
return _get_documents('consensus', '/tor/status-vote/current/consensus.z')
......@@ -955,7 +969,7 @@ def get_votes():
"""
Provides a mapping of directory authority nicknames to their present vote.
:returns: tuple of the form ({authority => vote}, issues)
:returns: tuple of the form ({authority nickname => vote}, issues)
"""
return _get_documents('vote', '/tor/status-vote/current/authority.z')
......@@ -965,7 +979,6 @@ def _get_documents(label, resource):
documents, times_taken, clock_skew, issues = {}, {}, {}, []
for authority in list(DIRECTORY_AUTHORITIES.values()):
if authority.v3ident is None:
continue # not a voting authority
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment