Validation of configuration settings #649

Open
opened 2009-02-27 21:26:10 +00:00 by ndurner · 6 comments
ndurner commented 2009-02-27 21:26:10 +00:00
Owner

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])

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])
tahoe-lafs added the
code-nodeadmin
minor
enhancement
1.3.0
labels 2009-02-27 21:26:10 +00:00
tahoe-lafs added this to the undecided milestone 2009-02-27 21:26:10 +00:00

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

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

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'
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' ```

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?

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?
JeremyVisser commented 2010-03-09 07:08:21 +00:00
Author
Owner

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"\''
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"\'' ```
tahoe-lafs modified the milestone from undecided to 1.7.0 2010-04-11 23:07:15 +00:00
zooko modified the milestone from 1.7.0 to eventually 2010-06-17 04:33:09 +00:00
saeftl commented 2012-12-12 13:25:40 +00:00
Author
Owner

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...)

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...)

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

I opened #2139 to be about removing some forks or moving setup work to be before the fork.
Sign in to join this conversation.
No Milestone
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Reference: tahoe-lafs/trac-2024-07-25#649
No description provided.