]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Merge pull request #50144 from guits/wip-58735-quincy
authorGuillaume Abrioux <gabrioux@ibm.com>
Fri, 3 Mar 2023 14:54:15 +0000 (15:54 +0100)
committerGitHub <noreply@github.com>
Fri, 3 Mar 2023 14:54:15 +0000 (15:54 +0100)
quincy: ceph-volume: do not raise RuntimeError in util.lsblk

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

index b2ab933d55aebacddb5a1968dd5c2904f22daa0f,c113387a8f5d8e842e2879755f3970f0b699d9df..544848a9a391003241f6b9a32fb84ea25559f7f8
@@@ -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]