twistd plugin permissions problem causes users to think that tahoe-lafs unit tests failed #1005

Closed
opened 2010-03-27 18:23:56 +00:00 by nejucomo · 7 comments

I just installed 1.6.1 on an osx 10.6 box, seemingly successfully:
$ python ./setup.py build
... Output attached.

But when I run unittests many fail:
$ python ./setup.py test
... Output attached.

The first failure appears before unittest output, and may be irrelevant:

Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/twisted/python/usage.py", line 241, in parseOptions
    self.postOptions()
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/twisted/scripts/trial.py", line 293, in postOptions
    self['reporter'] = self._loadReporterByName(self['reporter'])
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/twisted/scripts/trial.py", line 279, in _loadReporterByName
    for p in plugin.getPlugins(itrial.IReporter):
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/twisted/plugin.py", line 200, in getPlugins
    allDropins = getCache(package)
--- <exception caught here> ---
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/twisted/plugin.py", line 179, in getCache
    dropinPath.setContent(pickle.dumps(dropinDotCache))
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/twisted/python/filepath.py", line 623, in setContent
    f = sib.open('w')
  File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/twisted/python/filepath.py", line 433, in open
    return open(self.path, mode+'b')
exceptions.IOError: [Errno 13] Permission denied: '/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/twisted/plugins/dropin.cache.new'
I just installed 1.6.1 on an osx 10.6 box, seemingly successfully: $ python ./setup.py build ... Output attached. But when I run unittests many fail: $ python ./setup.py test ... Output attached. The first failure appears before unittest output, and may be irrelevant: ``` Traceback (most recent call last): File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/twisted/python/usage.py", line 241, in parseOptions self.postOptions() File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/twisted/scripts/trial.py", line 293, in postOptions self['reporter'] = self._loadReporterByName(self['reporter']) File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/twisted/scripts/trial.py", line 279, in _loadReporterByName for p in plugin.getPlugins(itrial.IReporter): File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/twisted/plugin.py", line 200, in getPlugins allDropins = getCache(package) --- <exception caught here> --- File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/twisted/plugin.py", line 179, in getCache dropinPath.setContent(pickle.dumps(dropinDotCache)) File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/twisted/python/filepath.py", line 623, in setContent f = sib.open('w') File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/twisted/python/filepath.py", line 433, in open return open(self.path, mode+'b') exceptions.IOError: [Errno 13] Permission denied: '/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/twisted/plugins/dropin.cache.new' ```
nejucomo added the
code
major
defect
1.6.1
labels 2010-03-27 18:23:56 +00:00
nejucomo added this to the undecided milestone 2010-03-27 18:23:56 +00:00
Author

Attachment tahoe-lafs-1.6.1.build.log (30227 bytes) added

The installation output on osx 10.6

**Attachment** tahoe-lafs-1.6.1.build.log (30227 bytes) added The installation output on osx 10.6
Author

Attachment tahoe-lafs-1.6.1.test.log (15469 bytes) added

The output of: $ python ./setup.py test

**Attachment** tahoe-lafs-1.6.1.test.log (15469 bytes) added The output of: $ python ./setup.py test
Author

From irc:

ducki2p 11:20 
thats a known twisted issue; you need to run twistd --help as root once to complete its setup
nejucomo 11:24 
Oh, thanks!
24:45
I wonder if we need to modify the install instructions for tahoe-lafs in that case.

I did indeed run "sudo twistd --help" then reran the unittests and this exception went away. Attached the new unittest logs.

Notice however there are still failures documented in ticket #1006.

From irc: ``` ducki2p 11:20 thats a known twisted issue; you need to run twistd --help as root once to complete its setup nejucomo 11:24 Oh, thanks! 24:45 I wonder if we need to modify the install instructions for tahoe-lafs in that case. ``` I did indeed run "sudo twistd --help" then reran the unittests and this exception went away. Attached the new unittest logs. Notice however there are still failures documented in ticket #1006.
Author

Attachment tahoe-lafs-1.6.1.test2.log (62972 bytes) added

The unittests after running "sudo twistd --help".

**Attachment** tahoe-lafs-1.6.1.test2.log (62972 bytes) added The unittests after running "sudo twistd --help".
tahoe-lafs modified the milestone from undecided to 1.7.0 2010-03-29 00:15:01 +00:00

This is Twisted #2409 but let's leave this ticket (Tahoe-LAFS #1005) open in case we can figure out a work-around, possibly involving invoking sudo twistd --help at some point or at least updating the documentation to ask the user to do so.

This is [Twisted #2409](http://twistedmatrix.com/trac/ticket/2409) but let's leave this ticket (Tahoe-LAFS #1005) open in case we can figure out a work-around, possibly involving invoking `sudo twistd --help` at some point or at least updating the documentation to ask the user to do so.
zooko changed title from twisted file permissions cause unittest failures on osx 10.6 to twistd plugin permissions problem causes users to think that tahoe-lafs unit tests failed 2010-04-16 21:20:36 +00:00
tahoe-lafs modified the milestone from 1.7.0 to soon 2010-06-19 03:19:38 +00:00
davidsarah commented 2011-07-23 00:01:24 +00:00
Owner

The fix for Twisted #2409 was released in Twisted v11.0. I don't think we need to do anything to work around it in Tahoe-LAFS; the problem will go away as people use newer versions of Twisted.

The [fix](http://twistedmatrix.com/trac/changeset/31246) for [Twisted #2409](http://twistedmatrix.com/trac/ticket/2409) was released in Twisted v11.0. I don't think we need to do anything to work around it in Tahoe-LAFS; the problem will go away as people use newer versions of Twisted.
tahoe-lafs added the
invalid
label 2011-07-23 00:01:24 +00:00
davidsarah closed this issue 2011-07-23 00:01:24 +00:00
davidsarah commented 2011-07-23 00:06:00 +00:00
Owner

Note that fixed versions of Twisted will still print the single line "Unexpected error while writing cache file". We might want to document that that is harmless.

Note that fixed versions of Twisted will still print the single line "Unexpected error while writing cache file". We might want to document that that is harmless.
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#1005
No description provided.