log the exception as error

Signed-off-by: Alfredo Deza <alfredo.deza@inktank.com>
configure logging for testing

Signed-off-by: Alfredo Deza <alfredo.deza@inktank.com>
tests for sync_object in worker.py

Signed-off-by: Alfredo Deza <alfredo.deza@inktank.com>
allow a stringified version of the http status code

Signed-off-by: Alfredo Deza <alfredo.deza@inktank.com>
raise SyncFailed on transient errors

Signed-off-by: Alfredo Deza <alfredo.deza@inktank.com>
by default object is not found, changing only when sync_object_intra_region() works

Signed-off-by: Alfredo Deza <alfredo.deza@inktank.com>
add a test that ensures that wait_for_object is not called if object is not found

Signed-off-by: Alfredo Deza <alfredo.deza@inktank.com>
client: don't hide boto return values

The decorator for translating boto exceptions needs to return
explicitly, or it will lose the return value of the original function,
and cause full sync to fail for objects that aren't in the bucket
index log.

Signed-off-by: Josh Durgin <jdurgin@redhat.com>
worker: process full sync for buckets with no log

This way we catch objects that were uploaded before zones or data logs
were set up. If there are actually no objects in the bucket, the
bucket listing will tell us that.

Signed-off-by: Josh Durgin <jdurgin@redhat.com>
client: escape copy source header

Need to esacpe the x-amz-copy-source header.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
Treat HTTP 500 as any other HTTP error for a copy request

We still want to retry later, since 500 could be the gateway timing
out, or it being upgraded to fix a bug, etc.

Signed-off-by: Josh Durgin <jdurgin@redhat.com>
Immediately fail when op state is not found

There's a very narrow window in which our connection sending the copy
request could fail before radosgw records the op state, and we query
the op state in that time. Retrying later at that point is fine, and
avoids a long timeout if there is a bug causing us to reach this point
without the op state ever being recorded. This race hasn't been
observed in practice.

Signed-off-by: Josh Durgin <jdurgin@redhat.com>
More tests for wait_for_object()

Signed-off-by: Josh Durgin <jdurgin@redhat.com>
Add tests for boto_call decorator

Signed-off-by: Josh Durgin <jdurgin@redhat.com>
client: return object names instead of boto resultsets

Signed-off-by: Josh Durgin <jdurgin@redhat.com>
test the new boto request ensuring our urls are kept

Signed-off-by: Alfredo Deza <alfredo.deza@inktank.com>