Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rgwlc: permit lifecycle processing for a single bucket #44139

Merged
merged 2 commits into from Dec 3, 2021

Conversation

mattbenjamin
Copy link
Contributor

@mattbenjamin mattbenjamin commented Nov 30, 2021

Permit a --bucket option to be passed to radosgw-admin lc process,
and propagate the bucket name to lifecycle processing, and process
only the named bucket if one is provided.

Fixes: https://tracker.ceph.com/issues/53430

Signed-off-by: Matt Benjamin mbenjamin@redhat.com

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

Permit a --bucket option to be passed to radosgw-admin lc process,
and propagate the bucket name to lifecycle processing, and process
only the named bucket if one is provided.

Fixes: https://tracker.ceph.com/issues/53430

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
@mattbenjamin
Copy link
Contributor Author

jenkins retest this please

@mattbenjamin
Copy link
Contributor Author

it doesn't make sense to search all lc partitions for the bucket, let's see if we can fix that...

@dang
Copy link
Contributor

dang commented Nov 30, 2021

Feel free to modify zipper APIs if necessary. I did the minimum necessary to make it work, and they may not be optimal.

src/rgw/rgw_lc.cc Outdated Show resolved Hide resolved
@mattbenjamin
Copy link
Contributor Author

@dang @cbodley could you re-review?

src/rgw/rgw_lc.cc Show resolved Hide resolved
src/rgw/rgw_lc.h Outdated Show resolved Hide resolved
if (ret < 0)
return 0;

if (! (cct->_conf->rgw_lc_lock_max_time == 9969)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does this check accomplish? it's not clear where 9969 comes from. there's also a local variable max_lock_secs that stores the value of this config option

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is debugging magic, try to ignore

src/rgw/rgw_lc.cc Outdated Show resolved Hide resolved
Copy link
Contributor

@dang dang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mattbenjamin
Copy link
Contributor Author

oops, forgot to constify the unique_ptr

src/rgw/rgw_lc.cc Outdated Show resolved Hide resolved
Looks up the shard index of the corresponding bucket, and only
buckets in the corresponding shard are considered for processing.
This has a side effect of matching buckets by id, and also adds
support for --tenant.

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
Copy link
Contributor

@cbodley cbodley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, just don't forget to remove the (cct->_conf->rgw_lc_lock_max_time == 9969) bit

@mattbenjamin
Copy link
Contributor Author

mattbenjamin commented Dec 2, 2021

@mattbenjamin mattbenjamin merged commit 8a966d5 into ceph:master Dec 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants