]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
Merge pull request #50145 from guits/wip-58736-pacific
authorAdam King <47704447+adk3798@users.noreply.github.com>
Wed, 22 Feb 2023 16:56:52 +0000 (11:56 -0500)
committerGitHub <noreply@github.com>
Wed, 22 Feb 2023 16:56:52 +0000 (11:56 -0500)
pacific: ceph-volume: do not raise RuntimeError in util.lsblk

Reviewed-by: Teoman ONAY <tonay@ibm.com>
1  2 
src/ceph-volume/ceph_volume/util/disk.py

index 1a76a8a05514e06ca4751e3d43bc436ec7a9f394,01cd4ba7fe8cd581c15c9db1846b286737897c52..90527e2090b6c5366c8a81e88d6dd7b9f655acf1
@@@ -238,13 -238,12 +238,14 @@@ def _udevadm_info(device)
  
  
  def lsblk(device, columns=None, abspath=False):
 -    result = lsblk_all(device=device,
 -                       columns=columns,
 -                       abspath=abspath)
 +    result = []
 +    if not os.path.isdir(device):
 +        result = lsblk_all(device=device,
 +                           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]