Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
Trac
Trac
  • Project overview
    • Project overview
    • Details
    • Activity
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Create a new issue
  • Issue Boards

GitLab is used only for code review, issue tracking and project management. Canonical locations for source code are still https://gitweb.torproject.org/ https://git.torproject.org/ and git-rw.torproject.org.

  • Legacy
  • TracTrac
  • Issues
  • #13645

Closed (moved)
Open
Opened Nov 03, 2014 by Micah Anderson@hacim

auto removal of bwauthority.cfg file causes bwauthority to fail to run

Due to a minor change in the NetworkScanners/BwAuthority/run_scan.sh the bwauthority cannot be run because the necessary configuration files are removed.

This line:

find data/scanner.* -name .svn -prune -o -type f -a ! -name '*-done-*' -exec rm {} +

introduced in 5ccc8b14ce1269ac93bb5506b010a5f1c6b4a77a will remove all the files from data/scanner.*, which includes the bwauthority.cfg file. When that file is removed, the bwauthority scripts will get into a tight loop and spit python traceback errors in the log for each scanner about:

NoSectionError: No section: 'TorCtl'

that is because the config files don't exist, and because they don't exist, there is no [TorCtl] section in the configs.

The fix is pretty simple:

diff --git a/NetworkScanners/BwAuthority/run_scan.sh b/NetworkScanners/BwAuthority/run_scan.sh
index cb32da9..de11226 100755
--- a/NetworkScanners/BwAuthority/run_scan.sh
+++ b/NetworkScanners/BwAuthority/run_scan.sh
@@ -33,7 +33,7 @@ sleep 5
 
 # FIXME: We resume in a ghetto way by saving the bws-*done* files.
 # A more accurate resume could be implemented in bwauthority.py
-find data/scanner.* -name .svn -prune -o -type f -a ! -name '*-done-*' -exec rm {} +
+find data/scanner.* -name .svn -prune -o -type f -a ! -name '*-done-*' -a ! -name bwauthority.cfg -exec rm {} +
 
 rm -f ./data/tor/tor.log
To upload designs, you'll need to enable LFS and have admin enable hashed storage. More information
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: legacy/trac#13645