[tor-bugs] #14024 [Onionoo]: web-app configuration error handling

Tor Bug Tracker & Wiki blackhole at torproject.org
Fri Jan 2 19:07:51 UTC 2015


#14024: web-app configuration error handling
-----------------------------+-----------------
     Reporter:  iwakeh       |      Owner:
         Type:  enhancement  |     Status:  new
     Priority:  minor        |  Milestone:
    Component:  Onionoo      |    Version:
   Resolution:               |   Keywords:
Actual Points:               |  Parent ID:
       Points:               |
-----------------------------+-----------------

Comment (by iwakeh):

 I think it is most useful that the setOutdir method just verifies the path
 and
 throws FileNotFoundEx. if there is no directory.
 The callers have to deal with that. Currently, only NodeIndexer is
 affected and
 an informative message should be logged and the web application should
 exit.

 A patch is attached, which exits the web application and logs an error
 message and
 a hint about where to fix the path, i.e.
 {{{
         Out-dir not found! Expected directory:
 /srv/onionoo.torproject.org/onionoo/out
         Verify the configuration in ./etc/web.xml.template
 }}}

 I think it might be better to keep real application configuration in files
 rather than
 on the command line. That way it'll be easier to determine runtime
 parameters during trouble-shooting.
 Command lines can be ephemeral sometimes.

 If the location of the outdir configuration is changed in future, the
 error handling
 is close to the affected code and can be easily adapted.

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


More information about the tor-bugs mailing list