]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-volume: do not raise RuntimeError in util.lsblk
authorGuillaume Abrioux <gabrioux@ibm.com>
Tue, 7 Feb 2023 09:51:36 +0000 (10:51 +0100)
committerYuri Weinstein <yweinste@redhat.com>
Wed, 5 Apr 2023 22:34:21 +0000 (22:34 +0000)
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 <gabrioux@ibm.com>
(cherry picked from commit 4f19a0f4e1726466968d610da3b0f753981e44a7)
(cherry picked from commit 259a3d554f53c549b135570f2054c3b5c517f993)

src/ceph-volume/ceph_volume/util/disk.py

index 09db425e00ae838a9aa0594c632cf59910e70ade..01cd4ba7fe8cd581c15c9db1846b286737897c52 100644 (file)
@@ -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]