From: Ali Maredia Date: Wed, 20 Sep 2023 04:12:15 +0000 (+0000) Subject: rgw: modify ret cond in middle of CreateBucket::Execute() X-Git-Tag: v19.0.0~51^2~1 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=0540cc65ef984aab63707bd7d59ecef5a9bdf17b;p=ceph-ci.git rgw: modify ret cond in middle of CreateBucket::Execute() Return prevents swift metadata from being removed if bucket already exists. Signed-off-by: Ali Maredia --- diff --git a/src/rgw/rgw_op.cc b/src/rgw/rgw_op.cc index 3accf03e496..1f017af5d80 100644 --- a/src/rgw/rgw_op.cc +++ b/src/rgw/rgw_op.cc @@ -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;