From 4f19a0f4e1726466968d610da3b0f753981e44a7 Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Tue, 7 Feb 2023 10:51:36 +0100 Subject: [PATCH] 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 --- src/ceph-volume/ceph_volume/util/disk.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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] -- 2.47.3