-
Notifications
You must be signed in to change notification settings - Fork 49
Open
Labels
Description
#4310 (introduced in SM 3.5.1) introduced regression in terms of task rescheduling mechanism.
It introduced additional initialActivation timestamp to calculate next activation so that we don't skip activations that were supposed to start during prolonged task execution. The problem is that since this PR, next activation is calculated on raw initialActivation without setting correct timezone. Because of that, task might be rescheduled in incorrect timezone.
Example:
miles@fedora:~/scylla-manager$ ./sctool.dev tasks -c myc
╭─────────────────────────────────────────────┬────────┬──────────────┬────────┬───────────────┬─────────┬───────┬────────────────────────┬────────────┬─────────┬────────────────────────╮
│ Task │ Labels │ Schedule │ Window │ Timezone │ Success │ Error │ Last Success │ Last Error │ Status │ Next │
├─────────────────────────────────────────────┼────────┼──────────────┼────────┼───────────────┼─────────┼───────┼────────────────────────┼────────────┼─────────┼────────────────────────┤
│ repair/myrepair │ │ 0 0 * * * │ │ Europe/Warsaw │ 0 │ 0 │ │ │ STOPPED │ 22 Jan 26 00:00:00 CET │ <- correct initial schedule
╰─────────────────────────────────────────────┴────────┴──────────────┴────────┴───────────────┴─────────┴───────┴────────────────────────┴────────────┴─────────┴────────────────────────╯
miles@fedora:~/scylla-manager$ ./sctool.dev start -c myc repair/myrepair
miles@fedora:~/scylla-manager$ ./sctool.dev stop -c myc repair/myrepair
miles@fedora:~/scylla-manager$ ./sctool.dev tasks -c myc
╭─────────────────────────────────────────────┬────────┬──────────────┬────────┬───────────────┬─────────┬───────┬────────────────────────┬────────────┬─────────┬────────────────────────╮
│ Task │ Labels │ Schedule │ Window │ Timezone │ Success │ Error │ Last Success │ Last Error │ Status │ Next │
├─────────────────────────────────────────────┼────────┼──────────────┼────────┼───────────────┼─────────┼───────┼────────────────────────┼────────────┼─────────┼────────────────────────┤
│ repair/myrepair │ │ 0 0 * * * │ │ Europe/Warsaw │ 0 │ 0 │ │ │ STOPPED │ 22 Jan 26 01:00:00 CET │ <- schedule drifted because of different timezone
╰─────────────────────────────────────────────┴────────┴──────────────┴────────┴───────────────┴─────────┴───────┴────────────────────────┴────────────┴─────────┴────────────────────────╯