]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commit
mgr/rbd_support: Stagger mirror snapshot and trash purge schedules
authorRamana Raja <rraja@redhat.com>
Mon, 29 Dec 2025 22:17:28 +0000 (17:17 -0500)
committerRamana Raja <rraja@redhat.com>
Wed, 25 Feb 2026 13:00:40 +0000 (08:00 -0500)
commit9c412c763352a76d83c117971548ec97b6974a32
treea20dff74d103febfc3934de883c1658cae14f37f
parent649c3131862d310ce0b273dcbe08ebca0c2ec7ec
mgr/rbd_support: Stagger mirror snapshot and trash purge schedules

Previously, multiple images or namespaces scheduled with the same
interval ran mirror snapshots or trash purges at around the same time,
creating spikes in cluster activity.

This change staggers scheduled jobs by:

- Adding a deterministic phase offset per image or namespace when no
  start-time is set.
- Picking a random element from the queue at each scheduled time, rather
  than always the first.

Together, these changes spread snapshot and trash purge operations more
evenly over time and improve cluster stability.

Fixes: https://tracker.ceph.com/issues/74288
Signed-off-by: Ramana Raja <rraja@redhat.com>
PendingReleaseNotes
doc/rbd/rbd-mirroring.rst
qa/workunits/rbd/cli_generic.sh
src/pybind/mgr/rbd_support/mirror_snapshot_schedule.py
src/pybind/mgr/rbd_support/schedule.py
src/pybind/mgr/rbd_support/trash_purge_schedule.py