From ed6340a47f32472bb1f650407dbe739c44bf4bd6 Mon Sep 17 00:00:00 2001 From: Casey Bodley Date: Mon, 9 Oct 2017 14:09:40 -0400 Subject: [PATCH] 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 --- src/rgw/rgw_data_sync.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rgw/rgw_data_sync.cc b/src/rgw/rgw_data_sync.cc index 19e60712fc9..0f4eb3fd3b0 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, -- 2.39.5