]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-disk: is_held must ignore multipath devices
authorLoic Dachary <ldachary@redhat.com>
Mon, 17 Aug 2015 22:18:51 +0000 (00:18 +0200)
committerLoic Dachary <ldachary@redhat.com>
Sat, 29 Aug 2015 00:37:51 +0000 (02:37 +0200)
Always return an empty list when is_held is called on a multipath
device.

The dmcrypt logic base decisions depending on the holders/slaves
relationship. Such relationships can also exists for multipath devices
but do not have the same semantic.

http://tracker.ceph.com/issues/11881 Fixes: #11881

Signed-off-by: Loic Dachary <ldachary@redhat.com>
src/ceph-disk

index 7226dd51962d2a39629336900eda7fbdb131df71..fd0ca4822d933621f8f555386b94efd92d48bd17 100755 (executable)
@@ -633,6 +633,9 @@ def is_held(dev):
     Check if a device is held by another device (e.g., a dm-crypt mapping)
     """
     assert os.path.exists(dev)
+    if is_mpath(dev):
+        return []
+
     dev = os.path.realpath(dev)
     base = get_dev_name(dev)