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: v17.2.6~43^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=71f30e47c75bfdd3306be6547e5dd864f2e51925;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 (cherry picked from commit 4f19a0f4e1726466968d610da3b0f753981e44a7) --- diff --git a/src/ceph-volume/ceph_volume/util/disk.py b/src/ceph-volume/ceph_volume/util/disk.py index d21e21a3602a..c113387a8f5d 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]