]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-disk: Fix for missing 'not' in *_is_diskdevice checks 16481/head
authorNikita Gerasimov <nikita.gerasimov@oracle.com>
Thu, 20 Jul 2017 16:58:40 +0000 (19:58 +0300)
committeruser <user@op-vm3.ru.oracle.com>
Fri, 21 Jul 2017 12:34:28 +0000 (15:34 +0300)
In 85d7f8817e94d7dbf81e20394c6778ecb677079c was introdused
is_diskdevice() tests but in some 'if' statements 'not' are lost.

Fixes: http://tracker.ceph.com/issues/20706
Signed-off-by: Nikita Gerasimov <nikita.gerasimov@oracle.com>
src/ceph-disk/ceph_disk/main.py

index ae5267d38a007c885256a8e5a0f5fc38b73b9ae7..3da13305dd6e5947457c15c9062c438439a4e88c 100755 (executable)
@@ -4097,7 +4097,7 @@ def get_space_osd_uuid(name, path):
     if not os.path.exists(path):
         raise Error('%s does not exist' % path)
 
-    if path_is_diskdevice(path):
+    if not path_is_diskdevice(path):
         raise Error('%s is not a block device' % path)
 
     if (is_partition(path) and
@@ -4701,7 +4701,7 @@ def set_suppress(path):
     disk = os.path.realpath(path)
     if not os.path.exists(disk):
         raise Error('does not exist', path)
-    if ldev_is_diskdevice(path):
+    if not ldev_is_diskdevice(path):
         raise Error('not a block device', path)
     base = get_dev_name(disk)