From: Casey Bodley Date: Mon, 9 Oct 2017 18:09:40 +0000 (-0400) Subject: rgw: fix error handling in ListBucketIndexesCR X-Git-Tag: v13.0.1~405^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ed6340a47f32472bb1f650407dbe739c44bf4bd6;p=ceph.git rgw: fix error handling in ListBucketIndexesCR the call to set_state() returns 0, when we want operate() to return the error code instead. use set_cr_error() to do this Fixes: http://tracker.ceph.com/issues/21735 Signed-off-by: Casey Bodley --- diff --git a/src/rgw/rgw_data_sync.cc b/src/rgw/rgw_data_sync.cc index 19e60712fc98..0f4eb3fd3b02 100644 --- a/src/rgw/rgw_data_sync.cc +++ b/src/rgw/rgw_data_sync.cc @@ -760,9 +760,9 @@ public: call(new RGWReadRESTResourceCR >(store->ctx(), sync_env->conn, sync_env->http_manager, entrypoint, NULL, &result)); } - if (get_ret_status() < 0) { + if (retcode < 0) { ldout(sync_env->cct, 0) << "ERROR: failed to fetch metadata for section bucket.index" << dendl; - return set_state(RGWCoroutine_Error); + return set_cr_error(retcode); } entries_index = new RGWShardedOmapCRManager(sync_env->async_rados, store, this, num_shards, store->get_zone_params().log_pool,