]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: fix error handling in ListBucketIndexesCR
authorCasey Bodley <cbodley@redhat.com>
Mon, 9 Oct 2017 18:09:40 +0000 (14:09 -0400)
committerCasey Bodley <cbodley@redhat.com>
Fri, 27 Oct 2017 13:48:37 +0000 (09:48 -0400)
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 <cbodley@redhat.com>
(cherry picked from commit ed6340a47f32472bb1f650407dbe739c44bf4bd6)

src/rgw/rgw_data_sync.cc

index 088259b5afafca5eb348f5d9ccfa3cb4a5441230..a66481e902544bdb8a27bab8e6ea574a3ed07ab9 100644 (file)
@@ -741,9 +741,9 @@ public:
         call(new RGWReadRESTResourceCR<list<string> >(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,