From: Casey Bodley Date: Fri, 11 Sep 2020 19:39:30 +0000 (-0400) Subject: rgw: return success on existing bucket X-Git-Tag: v16.1.0~1093^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F36978%2Fhead;p=ceph.git rgw: return success on existing bucket RGWRadosStore::create_bucket() only returns EEXIST errors when a conflict is detected and the recreation should fail. in other cases, return success and use the 'bool *existed' flag to notify the caller of its prior existence Signed-off-by: Casey Bodley --- diff --git a/src/rgw/rgw_sal_rados.cc b/src/rgw/rgw_sal_rados.cc index ae779ba96ff6..122d63588262 100644 --- a/src/rgw/rgw_sal_rados.cc +++ b/src/rgw/rgw_sal_rados.cc @@ -925,6 +925,7 @@ int RGWRadosStore::create_bucket(RGWUser& u, const rgw_bucket& b, pmaster_bucket, pmaster_num_shards, exclusive); if (ret == -EEXIST) { *existed = true; + ret = 0; } else if (ret != 0) { return ret; }