]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/rbd_support: log number of images 51464/head
authorRamana Raja <rraja@redhat.com>
Wed, 14 Jun 2023 21:41:48 +0000 (17:41 -0400)
committerRamana Raja <rraja@redhat.com>
Tue, 8 Aug 2023 20:26:19 +0000 (16:26 -0400)
... that have one snapshot request pending when the
mirror_snapshot_schedule handler is shutting down.

Signed-off-by: Ramana Raja <rraja@redhat.com>
(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

index 1797c34e6d238ae77310269846717fff49eae9f0..2abf666663c770ccc58446640d266c394345dfad 100644 (file)
@@ -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)