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

pacific: [rgw][lc][rgw_lifecycle_work_time] adjust timing if the configured end time is less than the start time #54885

Closed
wants to merge 3 commits into from

Conversation

trociny
Copy link
Contributor

@trociny trociny commented Dec 13, 2023

backport tracker: https://tracker.ceph.com/issues/63787


backport of #54622
parent tracker: https://tracker.ceph.com/issues/63613

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

…n a day

Signed-off-by: Oguzhan Ozmen <oozmen@bloomberg.net>
(cherry picked from commit b3afae9)

Conflicts:
	src/rgw/rgw_lc.cc (trivial)
…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 <oozmen@bloomberg.net>
(cherry picked from commit 48e189f)

Conflicts:
	src/test/rgw/test_rgw_lc.cc (not available)
Signed-off-by: Oguzhan Ozmen <oozmen@bloomberg.net>
(cherry picked from commit ea25085)

Conflicts:
	src/common/options/rgw.yaml.in (not exist, change manually added to src/common/options.cc)
@trociny trociny added this to the pacific milestone Dec 13, 2023
@trociny trociny added the rgw label Dec 13, 2023
@trociny
Copy link
Contributor Author

trociny commented Dec 13, 2023

The commits that add tests to src/test/rgw/test_rgw_lc.cc have been skipped as it is not available in pacific.

@ljflores
Copy link
Contributor

@trociny If this is a must for 16.2.15, please add it to https://github.com/ceph/ceph/milestone/17 since Pacific is going EOL.

@trociny trociny requested a review from cbodley January 10, 2024 07:41
@trociny
Copy link
Contributor Author

trociny commented Jan 10, 2024

@trociny If this is a must for 16.2.15, please add it to https://github.com/ceph/ceph/milestone/17 since Pacific is going EOL.

I am not sure this is a must for 16.2.15. I created this PR just in case (and it was useful for our custom build). I would like the rgw team leads decide if it is needed for 16.2.15.

@trociny
Copy link
Contributor Author

trociny commented Jan 10, 2024

jenkins test make check

@ljflores
Copy link
Contributor

jenkins retest this please

@cbodley
Copy link
Contributor

cbodley commented Jan 23, 2024

thanks for the contribution, but we're only taking blockers for 16.2.15 at this point

@cbodley cbodley closed this Jan 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants