If the host has a storage connection with multipath, lsblk is going to
return the block devices twice, then when creating LOGICAL storage pool
the user sees devices paths replicated in the UI.
This patch fixes this problem.
Signed-off-by: Rodrigo Trujillo <rodrigo.trujillo(a)linux.vnet.ibm.com>
---
src/kimchi/disks.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/kimchi/disks.py b/src/kimchi/disks.py
index 83d5cc6..ef065e2 100644
--- a/src/kimchi/disks.py
+++ b/src/kimchi/disks.py
@@ -113,7 +113,7 @@ def _get_vgname(devNodePath):
def get_partitions_names():
- names = []
+ names = set()
keys = ["NAME", "TYPE", "FSTYPE",
"MOUNTPOINT", "MAJ:MIN"]
# output is on format key="value",
# where key can be NAME, TYPE, FSTYPE, MOUNTPOINT
@@ -133,9 +133,9 @@ def get_partitions_names():
_is_dev_leaf(devNodePath)):
continue
- names.append(name)
+ names.add(name)
- return names
+ return list(names)
def get_partition_details(name):
--
1.8.5.3