]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-disk: only check partition_type if partition
authorLoic Dachary <ldachary@redhat.com>
Tue, 1 Sep 2015 12:59:14 +0000 (12:59 +0000)
committerSage Weil <sage@redhat.com>
Tue, 1 Sep 2015 15:33:34 +0000 (11:33 -0400)
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 <ldachary@redhat.com>
src/ceph-disk

index a57c3a6fb253bca51c0650c4e1f74d677ecc153b..d8a97a2e312217dcc7e0f9edee950774f3261c40 100755 (executable)
@@ -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)