From f1fa8116d441924d44c99624829f3daa090c821c Mon Sep 17 00:00:00 2001 From: Josh Durgin Date: Fri, 1 Nov 2013 16:12:52 -0700 Subject: [PATCH] rgw: don't turn 404 into 400 for the replicalog api 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 (cherry picked from commit 306ec7142d699c26ce874b11dc02ccdb3cf296c7) --- src/rgw/rgw_rest_replica_log.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/rgw/rgw_rest_replica_log.cc b/src/rgw/rgw_rest_replica_log.cc index 600a8edb78c5..2543f32fba6e 100644 --- a/src/rgw/rgw_rest_replica_log.cc +++ b/src/rgw/rgw_rest_replica_log.cc @@ -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; } -- 2.47.3