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

Closed
opened 2014-03-25 03:08:52 +00:00 by daira · 5 comments
daira commented 2014-03-25 03:08:52 +00:00
Owner

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

In /tahoe-lafs/trac-2024-07-25/issues/7141#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.

The retry handling for S3 containers in the cloud backend is broken. In [/tahoe-lafs/trac-2024-07-25/issues/7141](/tahoe-lafs/trac-2024-07-25/issues/7141)#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.
tahoe-lafs added the
code-storage
major
defect
cloud-branch
labels 2014-03-25 03:08:52 +00:00
tahoe-lafs added this to the soon milestone 2014-03-25 03:08:52 +00:00
daira commented 2014-03-26 14:51:45 +00:00
Author
Owner

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

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.)
daira commented 2014-03-29 19:32:46 +00:00
Author
Owner
Pull request at <https://github.com/LeastAuthority/tahoe-lafs/pull/4>.
tahoe-lafs added the
fixed
label 2014-04-13 21:47:17 +00:00
daira commented 2014-04-15 00:50:57 +00:00
Author
Owner
The fix was in <https://github.com/tahoe-lafs/tahoe-lafs/commit/de8b40188b67714a2a000206402a7458d6e55c68> and <https://github.com/tahoe-lafs/tahoe-lafs/commit/e0ffe8bfcdb3f15f8e83d6472e058fa681bbe2a6> on the 1819-cloud-merge branch.
tahoe-lafs modified the milestone from soon to 1.12.0 2014-11-27 03:50:22 +00:00

Milestone renamed

Milestone renamed
warner modified the milestone from 1.12.0 to 1.13.0 2016-03-22 05:02:25 +00:00

renaming milestone

renaming milestone
warner modified the milestone from 1.13.0 to 1.14.0 2016-06-28 18:17:14 +00:00
Sign in to join this conversation.
No Milestone
No Assignees
2 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#2206
No description provided.