]> git-server-git.apps.pok.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>
Wed, 11 Oct 2017 20:14:04 +0000 (16:14 -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>
src/rgw/rgw_data_sync.cc

index 19e60712fc9896562cd581ac4144c3f51f24d902..0f4eb3fd3b022140e931351f1ec770a59ed241f6 100644 (file)
@@ -760,9 +760,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,