diff --git a/src/fc/qemu/hazmat/ceph.py b/src/fc/qemu/hazmat/ceph.py index 54558db..44a46b5 100644 --- a/src/fc/qemu/hazmat/ceph.py +++ b/src/fc/qemu/hazmat/ceph.py @@ -453,7 +453,11 @@ def ensure(self): def ensure_volume_presence(self, name, pool, size): for ioctx in self.ioctxs.values(): - if name in self.rbd.list(ioctx): + try: + rbd.Image(ioctx, name) + except rbd.ImageNotFound: + continue + else: return self.rbd.create(self.ioctxs[pool], name, size)