diff --git a/CHANGES.txt b/CHANGES.txt index 3f5eb3e..1c8ddf4 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -16,6 +16,8 @@ Release notes when inventory data and real data mismatch and may shrink root images accidentally. (PL-133166) +- rbd: fix cluster load issue due to overuse of rbd.list (PL-133194) + 1.6 (2024-10-23) ---------------- diff --git a/src/fc/qemu/hazmat/ceph.py b/src/fc/qemu/hazmat/ceph.py index 19b5b0c..54558db 100644 --- a/src/fc/qemu/hazmat/ceph.py +++ b/src/fc/qemu/hazmat/ceph.py @@ -89,8 +89,11 @@ def volume(self): def exists_in_pools(self): result = [] for pool, ioctx in self.ceph.ioctxs.items(): - if self.name in self.ceph.rbd.list(ioctx): - result.append(pool) + try: + rbd.Image(ioctx, self.name) + except rbd.ImageNotFound: + continue + result.append(pool) return result def exists_in_pool(self):