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 <rraja@redhat.com>
This commit is contained in:
Ramana Raja 2023-06-14 17:41:48 -04:00
parent 6351ef5c8e
commit edc3b0e806

View File

@ -48,10 +48,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)