]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
luminous: rgw: correct backport to abort on bucket sync disable
authorCasey Bodley <cbodley@redhat.com>
Wed, 20 Feb 2019 19:01:24 +0000 (14:01 -0500)
committerCasey Bodley <cbodley@redhat.com>
Tue, 26 Feb 2019 18:08:29 +0000 (13:08 -0500)
the backport http://tracker.ceph.com/issues/26979 missed a block of code
to handle ENOENT on bucket sync disable

Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/rgw/rgw_data_sync.cc

index f487c6b70a123430ee50e6b9fc3d79868ca12bf6..04cb18163c14aa6e7ec3613dda6be4b0faf20e7b 100644 (file)
@@ -3085,6 +3085,12 @@ int RGWRunBucketSyncCoroutine::operate()
     do {
       if (sync_status.state == rgw_bucket_shard_sync_info::StateInit) {
         yield call(new RGWInitBucketShardSyncStatusCoroutine(sync_env, bs, sync_status));
+        if (retcode == -ENOENT) {
+          ldout(sync_env->cct, 0) << "bucket sync disabled" << dendl;
+          lease_cr->abort(); // deleted lease object, abort instead of unlock
+          drain_all();
+          return set_cr_done();
+        }
         if (retcode < 0) {
           ldout(sync_env->cct, 0) << "ERROR: init sync on " << bucket_shard_str{bs}
               << " failed, retcode=" << retcode << dendl;