Skip to content

rgw: maintain bucket instance xattrs during successful & cancelled reshard#44788

Closed
ivancich wants to merge 3 commits intoceph:wip-rgw-multisite-reshardfrom
ivancich:wip-rgw-multisite-reshard-reshard-xattrs
Closed

rgw: maintain bucket instance xattrs during successful & cancelled reshard#44788
ivancich wants to merge 3 commits intoceph:wip-rgw-multisite-reshardfrom
ivancich:wip-rgw-multisite-reshard-reshard-xattrs

Conversation

@ivancich
Copy link
Member

@ivancich ivancich commented Jan 26, 2022

With the new resharding code, some bucket metadata that is stored as xattrs (e.g., ACLs, life-cycle policies) were not sent with the updated bucket instance data when resharding completed. As a result, resharding has a regression where that metadata is lost after a successful reshard.

The first commit restores the variable in the RGWBucketReshard class that maintains the bucket attributes, so they can be saved when the bucket instance object is updated.

There appears to be a long-standing bug in RGW such that when resharding is cancelled and the bucket instance is updated to reflect the new resharding status, the xattrs were lost. The xattrs are used to store metadata such as ACLs and LifeCycle policies.

The second commit makes sure that all call paths that lead to a cancelled reshard provide the xattrs, so they can be included when the bucket instance info is updated.

Additionally, @cbodley contributed tests.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard cephadm
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox

@cbodley
Copy link
Contributor

cbodley commented Jan 26, 2022

not compiling yet, but it looks like the right approach 👍

can you please pull in the commit from #44643 so we can verify this branch in teuthology? we'll want to merge them at the same time

@ivancich ivancich force-pushed the wip-rgw-multisite-reshard-reshard-xattrs branch from c0467c2 to 58d8e9a Compare January 26, 2022 20:03
@ivancich ivancich changed the title Wip rgw multisite reshard reshard xattrs rgw: maintain bucket instance xattrs during successful & cancelled reshard Jan 26, 2022
@ivancich ivancich added needs-review and removed DNM labels Jan 26, 2022
@ivancich ivancich requested a review from mattbenjamin January 26, 2022 20:06
@ivancich
Copy link
Member Author

not compiling yet, but it looks like the right approach 👍

can you please pull in the commit from #44643 so we can verify this branch in teuthology? we'll want to merge them at the same time

Thanks for the early review. Yeah, it needed a few fixes from a slightly botched forward-port. I saw #44643 earlier today and that made me realize I'd never finished this work. I'll now bring in that commit. Thanks!

@github-actions github-actions bot added the tests label Jan 26, 2022
@cbodley
Copy link
Contributor

cbodley commented Jan 28, 2022

builds pending in https://shaman.ceph.com/builds/ceph/pr-44788/

@ivancich
Copy link
Member Author

I've heard that this fix may work for manual resharding but not dynamic resharding. I've added the DNM label until I can look into this.

ivancich and others added 3 commits January 28, 2022 16:40
With the new resharding code, some bucket metadata that is stored as
xattrs (e.g., ACLs, life-cycle policies) were not sent with the
updated bucket instance data when resharding completed. As a result,
resharding has a regression where that metadata is lost after a
successful reshard.

This commit restores the variable in the RGWBucketReshard class that
maintains the bucket attributes, so they can be saved when the bucket
instance object is updated.

Signed-off-by: J. Eric Ivancich <ivancich@redhat.com>
There appears to be a long-standing bug in RGW such that when
resharding is cancelled and the bucket instance is updated to reflect
the new resharding status, the xattrs were lost. The xattrs are used
to store metadata such as ACLs and LifeCycle policies.

This commit makes sure that all call paths that lead to a cancelled
reshard provide the xattrs, so they can be included when the bucket
instance info is updated.

Signed-off-by: J. Eric Ivancich <ivancich@redhat.com>
Signed-off-by: Casey Bodley <cbodley@redhat.com>
@ivancich ivancich force-pushed the wip-rgw-multisite-reshard-reshard-xattrs branch from 09d5ae9 to 25bcf44 Compare January 28, 2022 21:40
@ivancich
Copy link
Member Author

My own testing appears to show that it does work with dynamic resharding. I'm waiting for further information from the reporter.

@mattbenjamin
Copy link
Contributor

My own testing appears to show that it does work with dynamic resharding. I'm waiting for further information from the reporter.

yay

@cbodley
Copy link
Contributor

cbodley commented Jan 31, 2022

first qa run failed with Not found or unloadable (MGR_MODULE_ERROR) errors in https://pulpito.ceph.com/cbodley-2022-01-28_18:51:25-rgw-pr-44788-distro-default-smithi/

i added the fix and rescheduled in https://pulpito.ceph.com/cbodley-2022-01-31_18:53:37-rgw-pr-44788-distro-default-smithi/

@ivancich
Copy link
Member Author

ivancich commented Feb 1, 2022

jenkins test make check

@cbodley
Copy link
Contributor

cbodley commented Feb 1, 2022

rerun scheduled in https://pulpito.ceph.com/cbodley-2022-02-01_16:05:17-rgw-pr-44788-distro-default-smithi

using https://github.com/cbodley/ceph/commits/pr-44788 as the suite-branch, which has extra commits for the mgr feedback module and the centos 8 stream changes

@cbodley
Copy link
Contributor

cbodley commented Feb 1, 2022

pushed to wip-rgw-multisite-reshard, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants