Federico Simoncelli has uploaded a new change for review.

Change subject: fileSD: include gluster in getMountsList
......................................................................

fileSD: include gluster in getMountsList

Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1124397
Change-Id: I81600a68bbea99c1079bf153cf2c105c6fe73f70
Signed-off-by: Federico Simoncelli <[email protected]>
---
M vdsm/storage/fileSD.py
1 file changed, 17 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/34/30934/1

diff --git a/vdsm/storage/fileSD.py b/vdsm/storage/fileSD.py
index e6b1a7c..4915d62 100644
--- a/vdsm/storage/fileSD.py
+++ b/vdsm/storage/fileSD.py
@@ -640,13 +640,24 @@
 
 
 def getMountsList(pattern="*"):
-    finalPat = os.path.join(sd.StorageDomain.storage_repository,
-                            sd.DOMAIN_MNT_POINT, pattern)
-    mntList = glob.glob(finalPat)
+    fileDomPath = os.path.join(
+        sd.StorageDomain.storage_repository, sd.DOMAIN_MNT_POINT,
+        pattern)
+
     # For pattern='*' in mixed pool (block and file domains)
-    # glob will return sd.BLOCKSD_DIR among of real mount points.
-    # Remove sd.BLOCKSD_DIR from glob results.
-    return [mnt for mnt in mntList if not mnt.endswith('/' + sd.BLOCKSD_DIR)]
+    # glob will return sd.BLOCKSD_DIR and sd.GLUSTERSD_DIR among
+    # real mount points. Remove sd.BLOCKSD_DIR from glob results.
+    mntList = [mnt for mnt in glob.glob(fileDomPath)
+               if not mnt.endswith('/' + sd.BLOCKSD_DIR)
+               and not mnt.endswith('/' + sd.GLUSTERSD_DIR)]
+
+    glusterDomPath = os.path.join(
+        sd.StorageDomain.storage_repository, sd.DOMAIN_MNT_POINT,
+        sd.GLUSTERSD_DIR, pattern)
+
+    mntList.extend(glob.glob(glusterDomPath))
+
+    return mntList
 
 
 def scanDomains(pattern="*"):


-- 
To view, visit http://gerrit.ovirt.org/30934
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I81600a68bbea99c1079bf153cf2c105c6fe73f70
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Federico Simoncelli <[email protected]>
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to