[tahoe-lafs-trac-stream] [tahoe-lafs] #1525: SFTP: handle download failures correctly

tahoe-lafs trac at tahoe-lafs.org
Sat Sep 3 22:07:01 PDT 2011


#1525: SFTP: handle download failures correctly
-------------------------+-------------------------------------------------
     Reporter:           |      Owner:  davidsarah
  davidsarah             |     Status:  new
         Type:  defect   |  Milestone:  soon
     Priority:  major    |    Version:  1.9.0a1
    Component:  code-    |   Keywords:  sftp hang error streaming
  frontend               |  performance test-needed
   Resolution:           |
Launchpad Bug:           |
-------------------------+-------------------------------------------------

Comment (by davidsarah):

 In [attachment:broken-tests-for-1525.darcs.patch], there seems to be a
 dependency on the test order:
 {{{
 davidsarah at shinier:~/tahoe/1.9alpha$ bin/tahoe debug trial --rterror
 allmydata.test.test_sftp.Handler.test_openFile_write
 allmydata.test.test_sftp.Handler.test_openFile_read
 allmydata.test.test_sftp.Handler.test_openDirectory_and_attrs
 allmydata.test.test_sftp
   Handler
     test_openFile_write ...
 [OK]
     test_openFile_read ...
 [OK]
     test_openDirectory_and_attrs ...
 [OK]

 -------------------------------------------------------------------------------
 Ran 3 tests in 8.720s

 PASSED (successes=3)
 davidsarah at shinier:~/tahoe/1.9alpha$ bin/tahoe debug trial --rterror
 allmydata.test.test_sftp
 allmydata.test.test_sftp
   Handler
     test_basic ...
 [OK]
     test_convert_error ...
 [OK]
     test_execCommand_and_openShell ...
 [OK]
     test_extendedRequest ...
 [OK]
     test_makeDirectory ...
 [OK]
     test_not_implemented ...
 [OK]
     test_openDirectory_and_attrs ...
 [OK]
     test_openFile_read ...
 [OK]
     test_openFile_write ... Traceback (most recent call last):
 Failure: allmydata.interfaces.NoSharesError: no shares (need 3). Last
 failure: [Failure instance: Traceback (failure with no frames): <class
 'foolscap.tokens.RemoteException'>: <RemoteException around '[Failure
 instance: Traceback: <type 'exceptions.OSError'>: [Errno 2] No such file
 or directory:
 'sftp/openFile_read/servers/7r4gd6xu/storage/shares/hc/hcatcbxpnrcch37ihub4vi2shy/3'
 /usr/lib/python2.6/dist-
 packages/twisted/internet/base.py:796:runUntilCurrent
 /home/davidsarah/tahoe/1.9alpha/support/lib/python2.6/site-
 packages/foolscap-0.6.1-py2.6.egg/foolscap/eventual.py:26:_turn
 /usr/lib/python2.6/dist-packages/twisted/internet/defer.py:318:callback
 /usr/lib/python2.6/dist-
 packages/twisted/internet/defer.py:424:_startRunCallbacks
 --- <exception caught here> ---
 /usr/lib/python2.6/dist-
 packages/twisted/internet/defer.py:441:_runCallbacks
 /home/davidsarah/tahoe/1.9alpha/src/allmydata/test/no_network.py:83:<lambda>
 /home/davidsarah/tahoe/1.9alpha/src/allmydata/test/no_network.py:80:_call
 /home/davidsarah/tahoe/1.9alpha/src/allmydata/test/no_network.py:66:_really_call
 /home/davidsarah/tahoe/1.9alpha/src/allmydata/storage/immutable.py:314:remote_read
 /home/davidsarah/tahoe/1.9alpha/src/allmydata/storage/immutable.py:89:read_share_data
 /usr/lib/python2.6/genericpath.py:49:getsize
 ]'>
 ]
 [ERROR]
     test_removeDirectory ...
 [OK]
     test_removeFile ...
 [OK]
     test_renameFile ...
 [OK]
     test_renameFile_posix ...
 [OK]

 ===============================================================================
 [ERROR]: allmydata.test.test_sftp.Handler.test_openFile_write

 Traceback (most recent call last):
 Failure: allmydata.interfaces.NoSharesError: no shares (need 3). Last
 failure: [Failure instance: Traceback (failure with no frames): <class
 'foolscap.tokens.RemoteException'>: <RemoteException around '[Failure
 instance: Traceback: <type 'exceptions.OSError'>: [Errno 2] No such file
 or directory:
 'sftp/openFile_read/servers/7r4gd6xu/storage/shares/hc/hcatcbxpnrcch37ihub4vi2shy/3'
 /usr/lib/python2.6/dist-
 packages/twisted/internet/base.py:796:runUntilCurrent
 /home/davidsarah/tahoe/1.9alpha/support/lib/python2.6/site-
 packages/foolscap-0.6.1-py2.6.egg/foolscap/eventual.py:26:_turn
 /usr/lib/python2.6/dist-packages/twisted/internet/defer.py:318:callback
 /usr/lib/python2.6/dist-
 packages/twisted/internet/defer.py:424:_startRunCallbacks
 --- <exception caught here> ---
 /usr/lib/python2.6/dist-
 packages/twisted/internet/defer.py:441:_runCallbacks
 /home/davidsarah/tahoe/1.9alpha/src/allmydata/test/no_network.py:83:<lambda>
 /home/davidsarah/tahoe/1.9alpha/src/allmydata/test/no_network.py:80:_call
 /home/davidsarah/tahoe/1.9alpha/src/allmydata/test/no_network.py:66:_really_call
 /home/davidsarah/tahoe/1.9alpha/src/allmydata/storage/immutable.py:314:remote_read
 /home/davidsarah/tahoe/1.9alpha/src/allmydata/storage/immutable.py:89:read_share_data
 /usr/lib/python2.6/genericpath.py:49:getsize
 ]'>
 ]
 -------------------------------------------------------------------------------
 Ran 13 tests in 20.290s

 FAILED (errors=1, successes=12)
 }}}

 Notice that the error in test_openfile_write refers to the directory
 {{{'sftp/openFile_read/servers/7r4gd6xu/storage/shares/hc/hcatcbxpnrcch37ihub4vi2shy/3'}}}
 being missing, but that is the wrong directory -- all the basedirs in each
 test should be unique, and the ones in test_openFile_write should start
 with {{{sftp/openFile_write}}}. Can anyone see what is going on?

-- 
Ticket URL: <http://tahoe-lafs.org/trac/tahoe-lafs/ticket/1525#comment:1>
tahoe-lafs <http://tahoe-lafs.org>
secure decentralized storage


More information about the tahoe-lafs-trac-stream mailing list