Merge pull request #18018 from tchaikov/wip-ceph-disk-cleanup

ceph-disk: more precise error message when a disk is specified

Reviewed-by: Loic Dachary <ldachary@redhat.com>
Reviewed-by: Sage Weil <sage@redhat.com>
This commit is contained in:
Kefu Chai 2017-09-30 12:10:06 +08:00 committed by GitHub
commit c76742b748

View File

@ -859,7 +859,7 @@ def get_partition_base_mpath(dev):
def is_partition(dev):
"""
Check whether a given device path is a partition or a full disk.
Check whether a given device path is a partition
"""
if is_mpath(dev):
return is_partition_mpath(dev)
@ -879,7 +879,7 @@ def is_partition(dev):
if os.path.exists('/sys/dev/block/%d:%d/partition' % (major, minor)):
return True
raise Error('not a disk or partition', dev)
raise Error('not a disk partition', dev)
def is_mounted(dev):