]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: return success on existing bucket 36978/head
authorCasey Bodley <cbodley@redhat.com>
Fri, 11 Sep 2020 19:39:30 +0000 (15:39 -0400)
committerCasey Bodley <cbodley@redhat.com>
Fri, 11 Sep 2020 19:54:33 +0000 (15:54 -0400)
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 <cbodley@redhat.com>
src/rgw/rgw_sal_rados.cc

index ae779ba96ff629d39cb34534e62686190a10e6f9..122d635882623844b8441c79cc777f613a0eb630 100644 (file)
@@ -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;
     }