Bug #74192
closedmgr/rbd_support: schedule 'start-time' argument produces confusing results
0%
Description
The schedule "start-time" argument is optionally passed when adding or removing an image snapshot schedule or a trash purge schedule. It is supposed to schedule an initial operation at a specific time of day for a particular time zone. Instead, it offsets the schedule’s anchor time by the specified "start-time". By default, the scheduler uses the UNIX epoch as the anchor to calculate recurring schedule times. The "start-time" argument simply shifts this anchor away from the UTC epoch, which is confusing. For example:
$ # current time
$ date --universal
Wed Dec 10 05:55:21 PM UTC 2025
$ rbd help mirror snapshot schedule add
usage: rbd mirror snapshot schedule add
[--pool <pool>]
[--namespace <namespace>]
[--image <image>]
<interval> [<start-time>]
Add mirror snapshot schedule.
Positional arguments
<interval> schedule interval
<start-time> schedule start time
Optional arguments
-p [ --pool ] arg pool name
--namespace arg namespace name
--image arg image name
$ # schedule interval of 1h and start-time at 19:00UTC
$ rbd mirror snapshot schedule add -p data --image img1 1h 19:00Z
$ rbd mirror snapshot schedule ls -p data --image img1
every 15m starting at 19:00:00+00:00
You would expect that the scheduler will run the first snapshot each day at 19:00 UTC and then run snapshots every 15 minutes. Instead, the scheduler runs the first snapshot at 18:00 UTC and then runs snapshots every 15 minutes:
$ rbd mirror snapshot schedule status -p data --image img1 SCHEDULE TIME IMAGE 2025-12-10 18:00:00 data/img1
Updated by Ramana Raja 6 months ago
- Status changed from In Progress to Fix Under Review
- Pull request ID set to 66612
Updated by Ramana Raja 6 months ago
- Status changed from Fix Under Review to In Progress
- Pull request ID deleted (
66612)
Updated by Ramana Raja 5 months ago
- Status changed from In Progress to Fix Under Review
Updated by Ilya Dryomov 4 months ago
- Status changed from Fix Under Review to Resolved
Updated by Upkeep Bot 4 months ago
- Merge Commit set to 0f286bb3d9f8f02f093dbdaade12c59d7faa2970
- Fixed In set to v20.3.0-5465-g0f286bb3d9
- Upkeep Timestamp set to 2026-02-21T16:14:37+00:00