Repository navigation
rgw/lc: enforce consistent rgw_lc_debug_interval start times - #65585
Conversation
we're not checking the return value of sscanf(), which says how many of the expected values it successfully parsed. given an invalid rgw_lifecycle_work_time string, any unparsed values would remain uninitialized - so preinitialize them with reasonable defaults Signed-off-by: Casey Bodley <[email protected]>
|
So, my thought is that we can make the debug lifecycle testing somewhat more similar to the real lifecycle runs by defining intervals w.r.t. midnight. Since the normal runs start at midnight, and have an interval of 24 hours, we can define test runs as starting at midnight, and running for a debug interval, and then starting a new cycle immediately. This allows us to define cycles only with math, and not not with timestamps, and to be able to tell if a given timestamp is within the current interval. Hopefully, this allows us to be consistent across workers, and to be closer to the real lifecycle, and possibly to test runs that last across more than one cycle. We can also do the same math in the test scripts, and hopefully be more precise than "wait several intervals". |
105eefd to
fa0d86b
Compare
while this makes sense, i found it simpler to make the intervals relative to the 1970 epoch for |
fa0d86b to
a30fb4c
Compare
|
in testing with
|
This makes sense, and works just as well (since the epoch is midnight anyway). |
when configured, rgw_lc_debug_interval causes lifecycle processing to run every interval. but different workers/radosgws could start these intervals at different times, making it difficult for already_run_today() to determine which buckets should be skipped in the current interval schedule_next_start_time() now chooses start times (in seconds since epoch) that are divisible by the rgw_lc_debug_interval to ensure that all workers use the same intervals already_run_today() uses this same logic to calculate the beginning of its current interval for comparison with the last time the bucket's processing started Fixes: https://tracker.ceph.com/issues/72943 Signed-off-by: Casey Bodley <[email protected]>
2fe1ed9 to
e2b43be
Compare
| const auto remainder = now.sec() % interval; | ||
| secs = interval - remainder; |
There was a problem hiding this comment.
my first attempt was closer to the existing logic:
- secs = start + cct->_conf->rgw_lc_debug_interval - now;
+ const auto remainder = start.sec() % interval;
+ secs = start - remainder + interval - now;but returned secs = 0 for the vast majority of calls, sending LCWorker into a tight loop with no sleeps
it now ignores start, instead returning seconds until the next interval after now
|
finally managed to get a decent qa run in https://pulpito.ceph.com/cbodley-2025-10-14_16:07:01-rgw-wip-cbodley-testing-distro-default-gibba/. lots of failures but they look the same as the 'main' baseline from https://pulpito.ceph.com/teuthology-2025-10-10_20:40:24-rgw-main-distro-default-smithi/ most importantly, the rgw/lifecycle job passed: https://pulpito.ceph.com/cbodley-2025-10-14_16:07:01-rgw-wip-cbodley-testing-distro-default-gibba/8551128/ |
|
jenkins test make check arm64 |
|
jenkins test make check arm64 |
1 similar comment
|
jenkins test make check arm64 |
|
the last few arm64 checks took over 4 hours, and got all the way to 318/319 before failing without a reason: |
|
jenkins test make check arm64 |
|
|
jenkins test make check arm64 |
1 similar comment
|
jenkins test make check arm64 |
first draft of a fix for https://tracker.ceph.com/issues/72943 to start discussion
already_run_today()is problematic whenrgw_lc_debug_intervalis configured:lifecycle should process every bucket once per interval. but if a bucket is processed late in one interval and early in the next interval, the bucket will be skipped because the distance between
now - start_dateis less than the intervalthis should instead compare
start_dateagainst the beginning of the current intervalwith
rgw_lc_debug_intervalconfigured, eachLCWorkeris callingRGWLC::process()once every debug interval, but different workers (especially across radosgw instances) may be starting each interval at arbitrary timesso "the beginning of the current interval" is not defined across workers, but we could attempt to make it so with changes to
LCWorker::should_work()andschedule_next_start_time(). Dan's suggestion was to fix an interval at midnight and make other start times relative to thatalready_run_today()is confusing in the non-debug case too, but i'm scared to touch that without test coverageShow available Jenkins commands
jenkins test classic perfJenkins Job | Jenkins Job Definitionjenkins test crimson perfJenkins Job | Jenkins Job Definitionjenkins test signedJenkins Job | Jenkins Job Definitionjenkins test make checkJenkins Job | Jenkins Job Definitionjenkins test make check arm64Jenkins Job | Jenkins Job Definitionjenkins test submodulesJenkins Job | Jenkins Job Definitionjenkins test dashboardJenkins Job | Jenkins Job Definitionjenkins test dashboard cephadmJenkins Job | Jenkins Job Definitionjenkins test apiJenkins Job | Jenkins Job Definitionjenkins test docsReadTheDocs | Github Workflow Definitionjenkins test ceph-volume allJenkins Jobs | Jenkins Jobs Definitionjenkins test windowsJenkins Job | Jenkins Job Definitionjenkins test rook e2eJenkins Job | Jenkins Job DefinitionYou must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.