]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-volume: do not raise RuntimeError in util.lsblk 50144/head
authorGuillaume Abrioux <gabrioux@ibm.com>
Tue, 7 Feb 2023 09:51:36 +0000 (10:51 +0100)
committerGuillaume Abrioux <gabrioux@redhat.com>
Thu, 16 Feb 2023 16:00:46 +0000 (17:00 +0100)
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)

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

index d21e21a3602a45b62c6bb785e52df92c6f57f91b..c113387a8f5d8e842e2879755f3970f0b699d9df 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]