#649 new enhancement

Validation of configuration settings

Reported by: ndurner Owned by:
Priority: minor Milestone: eventually
Component: code-nodeadmin Version: 1.3.0
Keywords: usability Cc:
Launchpad Bug:

Description (last modified by zooko)

Configuration settings like tub.location and introducer.furl are not validated by the code. tub.location is silently ignored if a port spec is missing. The same is true for introducer.furl if there's an error in the FURL ("at" instead of "@", as copied from pipermail/tahoe-dev/2009-February/001341.html)

Change History (10)

comment:1 Changed at 2009-02-27T21:34:00Z by zooko

Thanks for the bug report, Nils. See also #371 (corrupted introducer.furl causes subtle startup breakage).

comment:2 Changed at 2009-04-06T21:37:32Z by zooko

Heh, I just hit this exact same problem. I cut and pasted the introducer furl from the web archive of the mailing list and started tahoe. It said "probably started". But it fails to connect to the introducer. Investigation led me to the logs/incidents directory which had an incident report .bz2. Running flogtool dump on that bz2 file yielded a log which included:

   File "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/foolscap-0.3.2-py2.5.egg/foolscap/referenceable.py", line 825, in _init_from_url
     raise ValueError("unknown FURL prefix in %r" % (url,))
 exceptions.ValueError: unknown FURL prefix in 'pb://6cypm5tfsv6ag43g3j5z74qx5nfxa2qq at 207.7.131.41:64228,nooxie.zooko.com:64228/introducer'

comment:3 Changed at 2009-04-07T06:22:51Z by warner

It'd be great if this exception were hit during the Client constructor: that would make it a lot easier to report the error during tahoe start. I think it may still be necessary to change tahoe start to remove a fork or two to allow constructor-time exceptions to be reported by the parent process.

zooko: what were the next couple frames in that stacktrace?

comment:4 Changed at 2010-03-09T07:06:46Z by zooko

  • Keywords usability added

comment:5 Changed at 2010-03-09T07:08:21Z by JeremyVisser

I mistakenly put the pb:// URL in quotes in the config file, which resulted in the following exception:

 b/python2.5/site-packages/twisted/internet/defer.py", line 317, in _runCallbacks
     self.result = callback(self.result, *args, **kw)
   File "/home/amduser/trees/tahoe/support/lib/python2.5/site-packages/foolscap-0.4.2-py2.5.egg/foolscap/broker.py", line 540, in <lambda>
     d.addCallback(lambda res: self._doCall(delivery))
   File "/home/amduser/trees/tahoe/support/lib/python2.5/site-packages/foolscap-0.4.2-py2.5.egg/foolscap/broker.py", line 575, in _doCall
     return obj.doRemoteCall(delivery.methodname, args, kwargs)
   File "/home/amduser/trees/tahoe/support/lib/python2.5/site-packages/foolscap-0.4.2-py2.5.egg/foolscap/referenceable.py", line 60, in doRemoteCall
     res = meth(*args, **kwargs)
   File "/home/amduser/trees/tahoe/support/lib/python2.5/site-packages/foolscap-0.4.2-py2.5.egg/foolscap/broker.py", line 462, in remote_getReferenceByName
     return self.tub.getReferenceForName(name)
   File "/home/amduser/trees/tahoe/support/lib/python2.5/site-packages/foolscap-0.4.2-py2.5.egg/foolscap/pb.py", line 741, in getReferenceForName
     raise KeyError("unable to find reference for name '%s'" % (name,))
 exceptions.KeyError: 'unable to find reference for name \'introducer"\''

comment:6 Changed at 2010-04-11T23:07:15Z by davidsarah

  • Milestone changed from undecided to 1.7.0

comment:7 Changed at 2010-06-17T04:33:09Z by zooko

  • Milestone changed from 1.7.0 to eventually

comment:8 Changed at 2012-12-12T13:25:40Z by saeftl

The documentation in docs/configuration.rst should state that tub.location MUST include a portnumber, even if tub.port already specified one.

It would be very good if tahoe would check if the tub.location in tahoe.cfg corresponds to the values in existing private/*.furl files.

As of 1.9.2 it does not, so that the tub.location in tahoe.cfg is in fact overridden by existing private/*.furl files (why these files have to be in private/ for storage nodes but not for introducers is another question...)

comment:9 Changed at 2013-12-19T16:20:58Z by zooko

  • Description modified (diff)

comment:10 Changed at 2013-12-19T16:30:25Z by zooko

I opened #2139 to be about removing some forks or moving setup work to be before the fork.

Note: See TracTickets for help on using tickets.