#2206 closed defect (fixed)

S3 cloud container AttributeError when retrying an operation: S3Container instance has no attribute '_reactor'

Reported by: daira Owned by: zancas
Priority: major Milestone: 1.14.0
Component: code-storage Version: cloud-branch
Keywords: cloud s3 review-needed Cc:
Launchpad Bug:

Description (last modified by daira)

The retry handling for S3 containers in the cloud backend is broken.

In 2116#comment:27, we have a traceback ending with:

>   File \"/home/customer/LAFS_source/src/allmydata/storage/backends/cloud/cloud_common.py\", line 370, in _retry
>     d2 = self._handle_error(f, 1, None, description, operation, *args, **kwargs)
>   File \"/home/customer/LAFS_source/src/allmydata/storage/backends/cloud/cloud_common.py\", line 417, in _handle_error
>     d = task.deferLater(self._reactor, BACKOFF_SECONDS_BEFORE_RETRY[trynum-1], operation, *args, **kwargs)
> exceptions.AttributeError: S3Container instance has no attribute '_reactor'

This is a bug introduced during the refactoring that added allmydata.storage.backends.cloud.cloud_common.CommonContainerMixin. self._reactor is now set in the constructor inherited from CommonContainerMixin, but S3Container does not inherit from CommonContainerMixin and so does not call that constructor.

Change History (8)

comment:1 Changed at 2014-03-25T03:09:23Z by daira

  • Description modified (diff)
  • Owner set to daira
  • Status changed from new to assigned

comment:2 Changed at 2014-03-26T14:51:45Z by daira

Note that this is a classic example of the kind of error that would be caught by static typing but not necessarily by testing. (It does show that our test coverage for the S3 container is poor, which we knew about.)

comment:3 Changed at 2014-03-29T19:32:46Z by daira

  • Keywords review-needed added
  • Owner changed from daira to zancas
  • Status changed from assigned to new

comment:4 Changed at 2014-04-13T21:47:17Z by daira

  • Resolution set to fixed
  • Status changed from new to closed

comment:6 Changed at 2014-11-27T03:50:22Z by daira

  • Milestone changed from soon to 1.12.0

comment:7 Changed at 2016-03-22T05:02:25Z by warner

  • Milestone changed from 1.12.0 to 1.13.0

Milestone renamed

comment:8 Changed at 2016-06-28T18:17:14Z by warner

  • Milestone changed from 1.13.0 to 1.14.0

renaming milestone

Note: See TracTickets for help on using tickets.