]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
rgw: modify ret cond in middle of CreateBucket::Execute()
authorAli Maredia <amaredia@redhat.com>
Wed, 20 Sep 2023 04:12:15 +0000 (04:12 +0000)
committerCasey Bodley <cbodley@redhat.com>
Thu, 23 Nov 2023 22:40:30 +0000 (17:40 -0500)
Return prevents swift metadata from being removed
if bucket already exists.

Signed-off-by: Ali Maredia <amaredia@redhat.com>
src/rgw/rgw_op.cc

index 3accf03e496896286155ab62f17760b53577d6c4..1f017af5d80de5bc977852a26c659e0f8a55ca89 100644 (file)
@@ -3592,7 +3592,7 @@ void RGWCreateBucket::execute(optional_yield y)
    * recover from a partial create by retrying it. */
   ldpp_dout(this, 20) << "Bucket::create() returned ret=" << op_ret << " bucket=" << s->bucket << dendl;
 
-  if (op_ret)
+  if (op_ret < 0 && op_ret != EEXIST && op_ret != ERR_BUCKET_EXISTS)
     return;
 
   const bool existed = s->bucket_exists;