mirror of
https://github.com/ceph/ceph
synced 2025-04-08 10:42:01 +00:00
Merge pull request #21415 from ErwanAliasr1/evelu-cephdisk
ceph-disk: get_partition_dev() should fail until get_dev_path(partnam… Reviewed-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
commit
c67d35f282
@ -781,6 +781,10 @@ def get_partition_dev(dev, pnum):
|
||||
if not partname or len(f) < len(partname):
|
||||
partname = f
|
||||
if partname:
|
||||
# BLOCKDIR is populated but is it the case of get_dev_path(partname) ?
|
||||
if not os.path.exists(get_dev_path(partname)):
|
||||
raise Error('%s is not populated while %s has it' %
|
||||
(get_dev_path(partname), sys_entry))
|
||||
return get_dev_path(partname)
|
||||
else:
|
||||
raise Error('partition %d for %s does not appear to exist%s' %
|
||||
|
Loading…
Reference in New Issue
Block a user