[tahoe-lafs-trac-stream] [tahoe-lafs] #1803: S3 backend: AttributeError: 'NoneType' object has no attribute 'startswith'

tahoe-lafs trac at tahoe-lafs.org
Tue Apr 23 06:00:21 UTC 2013


#1803: S3 backend: AttributeError: 'NoneType' object has no attribute 'startswith'
------------------------------+------------------------------------
     Reporter:  zooko         |      Owner:  davidsarah
         Type:  defect        |     Status:  assigned
     Priority:  major         |  Milestone:  undecided
    Component:  code-storage  |    Version:  1.9.0-s3branch
   Resolution:                |   Keywords:  s3-backend error txaws
Launchpad Bug:                |
------------------------------+------------------------------------

Comment (by daira):

 We could work around this relatively straightforwardly by treating a None
 return from txaws as a failure that should cause a retry (in the current
 cloud backend, replace {{{_do_request}}} in cloud_common.py with the code
 below), but it goes against the grain to do that without understanding
 what the cause of the bug is, or at least whether it is in txaws or in
 {{{HTTPClientFactory}}}.

 {{{
     def _do_request(self, description, operation, *args, **kwargs):
         d = defer.maybeDeferred(operation, *args, **kwargs)
         def _maybe_retry(r):
             if r is None:
                 r = Failure(CloudError("unexpected value None returned
 from container operation"))
             if not isinstance(r, Failure):
                 return r
             d2 = self._handle_error(r, 1, None, description, operation,
 *args, **kwargs)
             def _trigger_incident(res):
                 log.msg(format="error(s) on cloud container operation:
 %(description)s %(arguments)s %(kwargs)s %(res)s",
                         arguments=args[:2], kwargs=kwargs,
 description=description, res=res,
                         level=log.WEIRD)
                 return res
             d2.addBoth(_trigger_incident)
             return d2
         d.addBoth(_maybe_retry)
         return d
 }}}

-- 
Ticket URL: <https://tahoe-lafs.org/trac/tahoe-lafs/ticket/1803#comment:4>
tahoe-lafs <https://tahoe-lafs.org>
secure decentralized storage


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