Ayal Baron has posted comments on this change.
Change subject: Distinguish between local and mounted SD's.
......................................................................
Patch Set 1: I would prefer that you didn't submit this
(6 inline comments)
....................................................
Commit Message
Line 5: CommitDate: 2012-12-13 12:56:34 +0200
Line 6:
Line 7: Distinguish between local and mounted SD's.
Line 8:
Line 9: Remote SD's were identified like locals due to mismatched name
s/Remote.*mangling/Remote SD's were mistakenly identified as local SD's./
s/This patch.*/This patch makes sure that findDomain won't crash on such
domains./
s/The /rhev.*//
s/The need.*//
Line 10: mangling.
Line 11: This patch is a minimal emergency fix.
Line 12: The /rhev/datacenter hierarchy should be revised.
Line 13: The need for localFsSD's should be revised too.
....................................................
File vdsm/storage/localFsSD.py
Line 102: def getRealPath(self):
Line 103: return os.readlink(self.mountpoint)
Line 104:
Line 105:
Line 106: # TODO: This function should be removed when the mangled mangling
name scheme
s/This function .*/Alternative solution to this is to get rid of the need for
localFS object and just use fileAccess object which in NFS would use oop and in
local would not/
Line 107: # of mounted (nfs, Posix) SD's and local SD's is fixed but...
Line 108: # Is better to remove completely the localFS SD's concept, but...
Line 109: # this will not fixed by now
Line 110: def isLocalFsDomain(sdUUID):
Line 109: # this will not fixed by now
Line 110: def isLocalFsDomain(sdUUID):
Line 111: """This ancillary function differentiates local and mounted SD's.
Line 112:
Line 113: Assumed that a local SD can't be mounted.
s/Assumed/Assumes/
Line 114: mounted: nfs, posixFS
Line 115: local: a link to a local dir in the /rhev/datacenter
Line 116: """
Line 117: mtab = open("/etc/mtab", "r").readlines()
Line 116: """
Line 117: mtab = open("/etc/mtab", "r").readlines()
Line 118: for mEntry in mtab:
Line 119: if sdUUID in mEntry:
Line 120: # This is a mounted domain therefore not exists as a
local SD.
s/exists as//
Line 121: isLocal = False
Line 122: break
Line 123: else:
Line 124: isLocal = True
Line 117: mtab = open("/etc/mtab", "r").readlines()
Line 118: for mEntry in mtab:
Line 119: if sdUUID in mEntry:
Line 120: # This is a mounted domain therefore not exists as a
local SD.
Line 121: isLocal = False
just return False
Line 122: break
Line 123: else:
Line 124: isLocal = True
Line 125: return isLocal
Line 121: isLocal = False
Line 122: break
Line 123: else:
Line 124: isLocal = True
Line 125: return isLocal
just return True.
Line 126:
Line 127:
Line 128: def findDomain(sdUUID):
--
To view, visit http://gerrit.ovirt.org/10024
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I12b5ba80121b8e8d23a63ecc7aaab829bfc67a51
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Eduardo <[email protected]>
Gerrit-Reviewer: Ayal Baron <[email protected]>
Gerrit-Reviewer: Haim Ateya <[email protected]>
Gerrit-Reviewer: Yeela Kaplan <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches