]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
rgw/lc: remove_bucket_config() doesn't update xattrs on bucket delete
authorCasey Bodley <cbodley@redhat.com>
Fri, 11 Aug 2023 17:25:33 +0000 (13:25 -0400)
committerCasey Bodley <cbodley@redhat.com>
Fri, 11 Aug 2023 20:52:09 +0000 (16:52 -0400)
we're deleting the bucket instance metadata anyway, so there's no reason
to send an additional write to remove the RGW_ATTR_LC xattr first. this
write bumps the cls_version and can cause the actual delete op to fail
with ECANCELED

Fixes: https://tracker.ceph.com/issues/62411
Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/rgw/driver/rados/rgw_sal_rados.cc

index e1d2f72369af5c5a78d214208e1f43fd4180fcad..a8914921fd24dd8369e87132f82eb0d19f53a8f0 100644 (file)
@@ -451,8 +451,9 @@ int RadosBucket::remove_bucket(const DoutPrefixProvider* dpp,
   }
 
   // remove lifecycle config, if any (XXX note could be made generic)
+  constexpr bool merge_attrs = false; // don't update xattrs, we're deleting
   (void) store->getRados()->get_lc()->remove_bucket_config(
-    this, get_attrs());
+    this, get_attrs(), merge_attrs);
 
   ret = store->ctl()->bucket->sync_user_stats(dpp, info.owner, info, y, nullptr);
   if (ret < 0) {