From a154babea5bffd0751bfb8702aed5a361afcec1c Mon Sep 17 00:00:00 2001 From: Guillaume Abrioux Date: Wed, 6 Jul 2022 13:42:02 +0200 Subject: [PATCH] ceph-volume: fix `simple scan` `lsblk_all()` should return an empty dict `{}` if nothing was found. If we raise `RuntimeError()` then the loop in `scan.Scan.main` will stop and make ceph-volume fails because we don't try to catch this exception. `scan.Scan.main()` has its own logic in order to detect the given path is a ceph-disk created OSD anyway. Fixes: https://tracker.ceph.com/issues/56482 Signed-off-by: Guillaume Abrioux (cherry picked from commit 2630a50acb4654332c0b6801e9214564bd09d3d0) --- src/ceph-volume/ceph_volume/util/disk.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ceph-volume/ceph_volume/util/disk.py b/src/ceph-volume/ceph_volume/util/disk.py index 31d9edd690d0f..b8f013bcc47a8 100644 --- a/src/ceph-volume/ceph_volume/util/disk.py +++ b/src/ceph-volume/ceph_volume/util/disk.py @@ -329,7 +329,7 @@ def lsblk_all(device='', columns=None, abspath=False): if dev['NAME'] == os.path.basename(device): return dev - raise RuntimeError(f"{device} not found in lsblk output") + return {} def is_device(dev): """ -- 2.39.5