From 35c9962e7a36402fc3799290e910aa0103a6878c Mon Sep 17 00:00:00 2001 From: Loic Dachary Date: Tue, 1 Sep 2015 12:59:14 +0000 Subject: [PATCH] ceph-disk: only check partition_type if partition The multipath sanity checks of get_journal_osd_uuid must not try to verify the partition type when the device is not a partition. Signed-off-by: Loic Dachary --- src/ceph-disk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ceph-disk b/src/ceph-disk index a57c3a6fb253b..d8a97a2e31221 100755 --- a/src/ceph-disk +++ b/src/ceph-disk @@ -2462,7 +2462,8 @@ def get_journal_osd_uuid(path): if not stat.S_ISBLK(mode): raise Error('%s is not a block device' % path) - if (get_partition_type(path) == MPATH_JOURNAL_UUID and + if (is_partition(path) and + get_partition_type(path) == MPATH_JOURNAL_UUID and not is_mpath(path)): raise Error('%s is not a multipath block device' % path) -- 2.39.5