]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: don't turn 404 into 400 for the replicalog api 804/head
authorJosh Durgin <josh.durgin@inktank.com>
Fri, 1 Nov 2013 23:12:52 +0000 (16:12 -0700)
committerJosh Durgin <josh.durgin@inktank.com>
Fri, 1 Nov 2013 23:13:52 +0000 (16:13 -0700)
404 is not actually a problem to clients like radosgw-agent, but 400
implies something about the request was incorrect.

Backport: dumpling
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
src/rgw/rgw_rest_replica_log.cc

index 600a8edb78c5b920e636cb2a96cd173a14beff45..2543f32fba6e84f296103ddae883d20ffb033b78 100644 (file)
@@ -171,7 +171,9 @@ static int bucket_instance_to_bucket(RGWRados *store, string& bucket_instance, r
   
   int r = store->get_bucket_instance_info(NULL, bucket_instance, bucket_info, &mtime, NULL);
   if (r < 0) {
-    dout(5) << "could not get bucket instance info for bucket=" << bucket_instance << dendl;
+    dout(5) << "could not get bucket instance info for bucket=" << bucket_instance << ": " << cpp_strerror(r) << dendl;
+    if (r == -ENOENT)
+      return r;
     return -EINVAL;
   }