[tor-bugs] #17158 [Core Tor/Tor]: Run an opt-in process for fallback directories

Tor Bug Tracker & Wiki blackhole at torproject.org
Fri Apr 29 02:28:31 UTC 2016


#17158: Run an opt-in process for fallback directories
-------------------------------------------------+-------------------------
 Reporter:  teor                                 |          Owner:  teor
     Type:  enhancement                          |         Status:
 Priority:  Medium                               |  needs_review
Component:  Core Tor/Tor                         |      Milestone:  Tor:
 Severity:  Normal                               |  0.2.8.x-final
 Keywords:  028-triaged, TorCoreTeam201604,      |        Version:
  must-fix-before-028-rc                         |     Resolution:
Parent ID:                                       |  Actual Points:  3 weeks
 Reviewer:  isis                                 |         Points:  small-
                                                 |  remaining
                                                 |        Sponsor:
                                                 |  SponsorU-can
-------------------------------------------------+-------------------------
Changes (by teor):

 * status:  merge_ready => needs_review


Comment:

 Replying to [comment:42 isis]:
 > (Putting into `merge_ready` state, even though it's already merged, in
 the event that maybe teor wants to fix cosmetic issues before closing.)

 I'd like to fix these issues - see my branch fallback-script on
 https://github.com/teor2345/tor.git

 > Some minor cosmetic issues:
 >
 >  * The `dateutil` module is in the `python-dateutil` package, not
 builtin, so it should probably also be listed as a dependency.

 Added dateutil as a dependency in the comments.

 46d8139  Improve comments in fallback update script

 >  * After printing `WARNING::Unable to import ipaddress, please install
 py2-ipaddress` it just appears to hang forever. Maybe do `sys.exit(1)` if
 a required dependency is missing? Or maybe warn that it's actually okay
 except that the script won't do netblock analysis?

 Clarified that particular log message to say the dependency is optional.

 Logged two additional messages about activities that may take some time:
 * before we download Onionoo data
 * before we download a consensus from each potential fallback

 Also made the log levels more consistent: ideally the script should show a
 few messages at warning level about relays that almost made it to being a
 fallback, and then a reason for every relay at info level.

 d41f92b Improve logging in fallback update script

 >  * Do we want to raise these cutoffs now?
 > {{{
 > # Reduced due to a bug in tor where a relay submits a 0 DirPort when
 restarted
 > # This causes OnionOO to (correctly) reset its stability timer
 > # This issue will be fixed in 0.2.7.7 and 0.2.8.2
 > # Until then, the CUTOFFs below ensure a decent level of stability.
 > ADDRESS_AND_PORT_STABLE_DAYS = 7
 > }}}

 Sadly, no, there's no 0.2.7.7 yet. And 0.2.6 - 0.2.4 relays are still
 affected by that bug.
 I've put it on the list of things to review for the 0.2.9 fallback list in
 #18828.

 >  * I get a bunch of these warnings: `WARNING::Consensus download: 23.1s
 too slow from IPredator (197.231.221.211:9030), max download time 15.0s.`
 for various relays which, like iPredator, I know are fast. (It's obvious
 this is due to my running the script through `torsocks`, but it wasn't
 clear to me that I shouldn't do that. It also seems odd to have the cutoff
 time hardcoded to 15s, since for all I (or the script) know, my roommate
 could be torrenting a bunch of anime and oopsies now it picks completely
 different fallbacks.)

 I had this issue as well when developing the script, my internet
 connection drops speed sometimes.

 I wrote a comment about needing a good network connection at the top of
 the script, or disabling the consensus download checks.

 46d8139  Improve comments in fallback update script

 The script also retries failed downloads, to avoid excluding a fallback
 due to transient network issues.

 I'm not sure what else could be done - do you think we should compare the
 entire set of times, and exclude those that are way too high?
 But that still doesn't address transient network issues.

 >  * In `cleanse_unprintable()`:
 > {{{
 >   for c in raw_string:
 >     if (c in string.ascii_letters or c in string.digits
 >         or c in string.punctuation or c in string.whitespace):
 > [...]
 > }}}
 >    You could also just use `string.printable`.

 Oops, I think I modified that line, and then didn't realise there was a
 simpler character class.

 46d8139 Simplify string cleansing in fallback update script

 >  * `# sockets, which is why we long this line here` s/long/log/

 46d8139  Improve comments in fallback update script

 >
 > Replying to [comment:41 teor]:
 > > (This has been merged to maint-0.2.8 and can be closed after review if
 there are no issues.)
 >
 > Overall the script LGTM. I'm willing to call this done.

 Then let's merge and close if you're happy with the cosmetic changes.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/17158#comment:43>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list