From: Guillaume Abrioux Date: Tue, 7 Feb 2023 09:51:36 +0000 (+0100) Subject: ceph-volume: do not raise RuntimeError in util.lsblk X-Git-Tag: v18.1.0~366^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F50017%2Fhead;p=ceph.git ceph-volume: do not raise RuntimeError in util.lsblk Otherwise it makes `simple scan` calls fail. ``` File "/usr/lib/python3.6/site-packages/ceph_volume/util/disk.py", line 246, in lsblk raise RuntimeError(f"{device} not found is lsblk report") RuntimeError: /var/lib/ceph/osd/ceph-0/ not found is lsblk report ``` Fixes: https://tracker.ceph.com/issues/58655 Signed-off-by: Guillaume Abrioux --- diff --git a/src/ceph-volume/ceph_volume/util/disk.py b/src/ceph-volume/ceph_volume/util/disk.py index aaf66270dda5..f470e0c0afba 100644 --- a/src/ceph-volume/ceph_volume/util/disk.py +++ b/src/ceph-volume/ceph_volume/util/disk.py @@ -242,7 +242,8 @@ def lsblk(device, columns=None, abspath=False): columns=columns, abspath=abspath) if not result: - raise RuntimeError(f"{device} not found is lsblk report") + logger.debug(f"{device} not found is lsblk report") + return {} return result[0]