]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/rbd_support: log number of images 52189/head
authorRamana Raja <rraja@redhat.com>
Wed, 14 Jun 2023 21:41:48 +0000 (17:41 -0400)
committerRamana Raja <rraja@redhat.com>
Mon, 26 Jun 2023 06:21:30 +0000 (02:21 -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)

src/pybind/mgr/rbd_support/mirror_snapshot_schedule.py

index 2e53fc1b28c5f3ef319ace06e75cf2510af0e4f3..b502ebbe34bfe268c340d4a06d317b406f5b34fa 100644 (file)
@@ -47,10 +47,13 @@ class CreateSnapshotRequests:
         self.wait_for_pending()
 
     def wait_for_pending(self) -> None:
-        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: str, namespace: str, image_id: str) -> None:
         image_spec = ImageSpec(pool_id, namespace, image_id)