Repository navigation
quincy: [rgw][lc][rgw_lifecycle_work_time] adjust timing if the configured end time is less than the start time - #54874
Merged
Merged
Conversation
rgwlc: add uint32_t flags bitmap to LCFilter This is intended to support a concise set of extensions to S3 LifecycleConfiguration, initially, just a flag that indicates a rule is intended for execution on RGW ArchiveZone. rgwlc: add machinery to define and recognize LCFilter flags Add a concept of filter flags to lifecycle filter rules, an RGW extension. The initial purpose of flags is to permit marking specific lifecycle rules as specific to an RGW archive zone, but other flags could be added in future. rgwlc: add new unittest_rgw_lc to run internal checks, add a few valid and invalid lifecycle configuration xml parses for now. Fixes: https://tracker.ceph.com/issues/53361 Signed-off-by: Matt Benjamin <[email protected]> (cherry picked from commit 23a588d)
Suggested by Casey in review, this makes the XML prettier. also: fix filter parsing, remove unused code Signed-off-by: Matt Benjamin <[email protected]> (cherry picked from commit dde64c3)
Lifecycle rules with the ArchiveZone flag must execute on archive zones, but must not execute on others. Fixes: https://tracker.ceph.com/issues/56440 Signed-off-by: Matt Benjamin <[email protected]> (cherry picked from commit 98c598b) Conflicts: src/rgw/rgw_sal.h (trivial) src/rgw/rgw_sal_dbstore.h (trivial) src/rgw/rgw_sal_motr.h (not exist) src/rgw/rgw_sal_rados.cc (trivial) src/rgw/rgw_sal_rados.h (trivial)
The basic idea of this change is the same as the proposal by Ilsoo Byun <[email protected]>, but some details have changed. The main differences are to use the existing RGWLC::set(remove)_bucket_config methods, and to use the RGWBucketInstanceMetadataHandler infrastructue to dispatch the corresponding calls. Thank you! Fixes: https://tracker.ceph.com/issues/44268 Related PR: ceph#33524 Signed-off-by: Matt Benjamin <[email protected]> (cherry picked from commit 2ee2266)
Also updates the location of Prefix, which is supposed to *generate* as <Filter><Prefix/></Filter>, regardless of how we parsed it. Signed-off-by: Matt Benjamin <[email protected]> (cherry picked from commit 313a8a4)
Signed-off-by: Matt Benjamin <[email protected]> (cherry picked from commit 92657be) Conflicts: src/rgw/rgw_sal_dbstore.h (trivial) src/rgw/rgw_sal_motr.h (not exist)
Found by Soumya Koduri <[email protected]> Signed-off-by: Matt Benjamin <[email protected]> (cherry picked from commit f9928dd)
Valid values are all small strings, often static. Signed-off-by: Matt Benjamin <[email protected]> (cherry picked from commit ff10064) Conflicts: src/rgw/rgw_sal_dbstore.h (trivial) src/rgw/rgw_sal_motr.h (not exist) src/rgw/rgw_sal_rados.cc (trivial) src/rgw/rgw_sal_rados.h (trivial)
…ude statement Signed-off-by: Oguzhan Ozmen <[email protected]> (cherry picked from commit 8e9871e)
…ule_next_start_time Signed-off-by: Oguzhan Ozmen <[email protected]> (cherry picked from commit 2446c01) Conflicts: src/test/rgw/test_rgw_lc.cc (fix compiler error: 'auto' not allowed in function prototype)
…n a day Signed-off-by: Oguzhan Ozmen <[email protected]> (cherry picked from commit b3afae9) Conflicts: src/rgw/rgw_lc.cc (allow_shard_rollover is not here, It was added in 0ecc2b8, so when it is eventually backported we will miss this change, but it does not introduce an issue, as it is just a replacement of 24*60*60 with secs_in_a_day constant)
…e start-time LC work time is given in the form of "HH:MM-HH:MM"; the first part represents the "start_time" and the next "end_time". "should_work" function decides, given the current time, whether the LC worker can resume. It essentially checks whether the current time is within start and end times. Since there's no "date" (month/day/year) notion taken into account, a work time whose end_time (i.e., hour field) is less than start_time is not properly handled by "should_work". For example, "14:00-13:59" would normally mean to start LC processing at 2PM local time and allowing it to run for 24 hours. So, given such a work time range, "should_work" must return true for any given current_time. However, without this adjustment, it always returns false. The fix simply adds a "next day" adjustment if the end_time is configured to be less than the configured start_time. Fixes https://tracker.ceph.com/issues/63613 Signed-off-by: Oguzhan Ozmen <[email protected]> (cherry picked from commit 48e189f)
Signed-off-by: Oguzhan Ozmen <[email protected]> (cherry picked from commit ea25085)
trociny
force-pushed
the
wip-63776-quincy
branch
from
December 12, 2023 11:56
ea24578 to
8079bf8
Compare
smanjara
self-requested a review
August 29, 2024 18:19
smanjara
approved these changes
Aug 29, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
backport tracker: https://tracker.ceph.com/issues/63776
backport of #54622
parent tracker: https://tracker.ceph.com/issues/63613
This PR is based on #54873 backport to avoid unnecessary conflicts. So it will need rebase when that PR is merged.
Also if PR #49527 is merged before this PR, then the conflict in "rgw/lc: [non-functional change] use const expr to represent seconds in a day" could be resolved.
this backport was staged using ceph-backport.sh version 16.0.0.6848
find the latest version at https://github.com/ceph/ceph/blob/main/src/script/ceph-backport.sh