From e7a97d081167ee222d5d435126658cfb2841be66 Mon Sep 17 00:00:00 2001 From: Casey Bodley Date: Fri, 11 Aug 2023 13:25:33 -0400 Subject: [PATCH] rgw/lc: remove_bucket_config() doesn't update xattrs on bucket delete 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 --- src/rgw/driver/rados/rgw_sal_rados.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/rgw/driver/rados/rgw_sal_rados.cc b/src/rgw/driver/rados/rgw_sal_rados.cc index e1d2f72369af5..a8914921fd24d 100644 --- a/src/rgw/driver/rados/rgw_sal_rados.cc +++ b/src/rgw/driver/rados/rgw_sal_rados.cc @@ -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) { -- 2.39.5