]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-volume: do not raise RuntimeError in util.lsblk 50017/head
authorGuillaume Abrioux <gabrioux@ibm.com>
Tue, 7 Feb 2023 09:51:36 +0000 (10:51 +0100)
committerGuillaume Abrioux <gabrioux@ibm.com>
Thu, 9 Feb 2023 09:03:21 +0000 (10:03 +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>
src/ceph-volume/ceph_volume/util/disk.py

index aaf66270dda508ea18f971001df20cc7eed2a16a..f470e0c0afbaf110de83503b95f37da7b4d814aa 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]