Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ticket33379 #57

Merged
merged 18 commits into from Mar 13, 2020
Merged

Ticket33379 #57

merged 18 commits into from Mar 13, 2020

Conversation

Labels
None yet
Projects
None yet
3 participants
@teor2345
Copy link
Contributor

@teor2345 teor2345 commented Mar 9, 2020

No description provided.

@teor2345 teor2345 force-pushed the ticket33379 branch 2 times, most recently from bd890eb to b245cda Mar 10, 2020
@teor2345 teor2345 changed the title WIP: Ticket33379 Ticket33379 Mar 10, 2020
@teor2345 teor2345 mentioned this pull request Mar 10, 2020
teor2345 added 5 commits Mar 11, 2020
The previous code counted the number of sleeps.

Using wallclock time is more accurate, and the code is simpler.

Part of 33232.
Split print_bootstrap_status() out into its own function.

Part of 33232.
wait_for_bootstrap now prints bootstrap progress every 20 seconds.

Part of 33232.
Before launching "chutney verify", test-network checks that all the
nodes have bootstrapped.

Part of 33232.
teor2345 added 9 commits Mar 12, 2020
When $CHUTNEY_WARNINGS_SKIP is true, skip all warnings.
And update some old code to use them.

Part of 33379.
Check that every relay has published its directory info to the
authorities, it is in the consensus, and every node has downloaded it.

Check that every bridge has published its directory info to the
bridge authority, and it is in the bridge networkstatus.

Check that every bridge client has downloaded bridge descriptors.

This code currently does not work for these chutney networks:
* bridges-min
* bridges+ipv6-min

All other networks pass the new tests.

Part of 33379.
Stop expecting bridges to be published in the consensus.

Also, stop expecting bridge clients to:
* have bridge microdescriptors, and
* have consensus relay full descriptors.

Partially fixes these chutney networks:
* bridges-min
* bridges+ipv6-min

Part of 33379.
Bridges with AssumeReachable fail to publish their descriptors, because
they try very early, when they haven't bootstrapped.

Turning off AssumeReachable in 33232 should fix this issue.

This changes makes these chutney networks succeed:
* bridges-min
* bridges+ipv6-min

Part of 33379.
@teor2345 teor2345 force-pushed the ticket33379 branch 2 times, most recently from 072dae6 to 04b25f1 Mar 12, 2020
Avoids a race condition in microdescriptor downloads in 0.3.5.

Once we check for microdescriptors in 33428, we should be able to reduce
this timeout.

Part of 33379.
teor2345 added 2 commits Mar 12, 2020
Authorities and relays need 3 *other* authorities/relays to bootstrap.
And Tor 0.3.5 needs 5 authorities/relays in the consensus.

We add authorities, because some networks only have one relay or exit,
to make sure all paths go through that relay/exit.

Part of 33232.
Tor 0.3.5 is unstable with exit relays in mixed+hs-v2, so we use
non-exit relays.

(Recent tor versions use mixed+hs-v23, and they support exit relays.)

Part of 33379.
Wait for a consistent amount of time between verify attempts,
regardless of the time elapsed during the attempt.

Try to make at least 2 verify attempts per consensus interval,
but also try to limit the number of attempts.

Also increase the default timeout: sometimes 3 seconds is too
short on a heavily-loaded machine.

These changes should make verification more reliable.

Part of 33379.
@teor2345 teor2345 mentioned this pull request Mar 12, 2020
ahf
ahf approved these changes Mar 12, 2020
try:
return self._env['bridge']
except KeyError:
return 0
Copy link
Member

@ahf ahf Mar 12, 2020

Nit pick: return self._env.get('bridge', 0)

def getBridgeClient(self):
"""Return the bridge client flag for this node."""
try:
return self._env['bridgeclient']
Copy link
Member

@ahf ahf Mar 12, 2020

Same nit as above.

def getBridgeAuthority(self):
"""Return the bridge authority flag for this node."""
try:
return self._env['bridgeauthority']
Copy link
Member

@ahf ahf Mar 12, 2020

Same nit as above.

def getAuthority(self):
"""Return the authority flag for this node."""
try:
return self._env['authority']
Copy link
Member

@ahf ahf Mar 12, 2020

Same nit as above.

The relay flag is set on authorities, relays, and bridges.
"""
try:
return self._env['relay']
Copy link
Member

@ahf ahf Mar 12, 2020

Same nit as above.

other_node_nick
for other_node_nick in dir_status
if dir_status[other_node_nick] is not None and
dir_status[other_node_nick][0] == status_code ]
Copy link
Member

@ahf ahf Mar 12, 2020

I often find the "complex" list comprehensions to be difficult to read and prefer things like using filter() there.

# this issue.
print("Waiting {} seconds for other dir info to sync...\n"
.format(int(Network.WAIT_FOR_UNCHECKED_DIR_INFO_DELAY)))
time.sleep(Network.WAIT_FOR_UNCHECKED_DIR_INFO_DELAY)
Copy link
Member

@ahf ahf Mar 12, 2020

Should we note down somewhere the places where we are sleeping where "technically" we should be awaiting some event of some sort?

@torproject-pusher torproject-pusher merged commit 95ce144 into torproject:master Mar 13, 2020
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment