From 38e534156ca54e95e2843a081eef0206986738e1 Mon Sep 17 00:00:00 2001 From: Ramana Raja Date: Wed, 14 Jun 2023 17:41:48 -0400 Subject: [PATCH] mgr/rbd_support: log number of images ... that have one snapshot request pending when the mirror_snapshot_schedule handler is shutting down. Signed-off-by: Ramana Raja (cherry picked from commit edc3b0e80653c30d0fc318a24673e8a0568912ad) Conflicts: src/pybind/mgr/rbd_support/mirror_snapshot_schedule.py - Above conflict was due to commit e4a16e2 ("mgr/rbd_support: add type annotation") not in pacific --- src/pybind/mgr/rbd_support/mirror_snapshot_schedule.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/pybind/mgr/rbd_support/mirror_snapshot_schedule.py b/src/pybind/mgr/rbd_support/mirror_snapshot_schedule.py index 1797c34e6d238..2abf666663c77 100644 --- a/src/pybind/mgr/rbd_support/mirror_snapshot_schedule.py +++ b/src/pybind/mgr/rbd_support/mirror_snapshot_schedule.py @@ -40,10 +40,13 @@ class CreateSnapshotRequests: self.wait_for_pending() def wait_for_pending(self): - self.log.debug("CreateSnapshotRequests.wait_for_pending") with self.lock: while self.pending: + self.log.debug( + "CreateSnapshotRequests.wait_for_pending: " + "{} images".format(len(self.pending))) self.condition.wait() + self.log.debug("CreateSnapshotRequests.wait_for_pending: done") def add(self, pool_id, namespace, image_id): image_spec = (pool_id, namespace, image_id) -- 2.39.5