s3: should retry on common errors

Bug #1164006 reported by Roger Peppe
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
goamz
New
Undecided
Unassigned

Bug Description

Here's a test failure from juju-core:

13:38.343 live_test.go:343:
13:38.351 c.Assert(err, IsNil)
13:38.351 ... value *errors.errorString = &errors.errorString{s:"cannot write file \"test-object\" to control bucket: remote error: handshake failure"} ("cannot write file \"test-object\" to control bucket: remote error: handshake failure")

We can do the retry within juju, but it would be nice if a similar approach
could be taken to goamz/ec2.

Unfortunately it's not going to be possible to retry PutReader, as the
http request will have read some of the Reader before failing.
Perhaps we could provide a way of asking if an error is temporary
or not, so clients don't have to hard-code the possible kinds of error.

Revision history for this message
Christopher Proto (chroto24) wrote :

There's probably a way to take advantage of the existing `aws/attempt.go` to accomplish this. Look at how `GetReader` works and the `shouldRetry` method.

Same kind of idea could be implemented for Puts, no?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.