예제 #1
0
파일: nfsSD.py 프로젝트: kanalun/vdsm
    def findDomainPath(sdUUID):
        for tmpSdUUID, domainPath in fileSD.scanDomains("*"):
            if tmpSdUUID == sdUUID and mount.isMounted(
                    os.path.join(domainPath, "..")):
                return domainPath

        raise se.StorageDomainDoesNotExist(sdUUID)
예제 #2
0
    def findDomainPath(sdUUID):
        for tmpSdUUID, domainPath in fileSD.scanDomains("*"):
            if tmpSdUUID == sdUUID and mount.isMounted(
                    os.path.join(domainPath, "..")):
                return domainPath

        raise se.StorageDomainDoesNotExist(sdUUID)
예제 #3
0
    def findDomainPath(sdUUID):
        glusterDomPath = os.path.join(sd.GLUSTERSD_DIR, "*")
        for tmpSdUUID, domainPath in fileSD.scanDomains(glusterDomPath):
            if tmpSdUUID == sdUUID and mount.isMounted(
                    os.path.join(domainPath, "..")):
                return domainPath

        raise se.StorageDomainDoesNotExist(sdUUID)
예제 #4
0
파일: glusterSD.py 프로젝트: sshnaidm/vdsm
    def findDomainPath(sdUUID):
        glusterDomPath = os.path.join(sd.GLUSTERSD_DIR, "*")
        for tmpSdUUID, domainPath in fileSD.scanDomains(glusterDomPath):
            if tmpSdUUID == sdUUID and mount.isMounted(os.path.join(domainPath,
                                                       "..")):
                return domainPath

        raise se.StorageDomainDoesNotExist(sdUUID)
예제 #5
0
파일: nfsSD.py 프로젝트: ekohl/vdsm
    def selftest(self):
        """
        Run internal self test
        """
        if not mount.isMounted(self.mountpoint):
            raise se.StorageDomainFSNotMounted(self.mountpoint)

        # Run general part of selftest
        fileSD.FileStorageDomain.selftest(self)
예제 #6
0
    def selftest(self):
        """
        Run internal self test
        """
        if not mount.isMounted(self.mountpoint):
            raise se.StorageDomainFSNotMounted(self.mountpoint)

        # Run general part of selftest
        fileSD.FileStorageDomain.selftest(self)
예제 #7
0
파일: nfsSD.py 프로젝트: ekohl/vdsm
    def _preCreateValidation(cls, sdUUID, domPath, typeSpecificArg, version):
        # Some trivial resource validation
        if ":" not in typeSpecificArg:
            raise se.StorageDomainIllegalRemotePath(typeSpecificArg)

        sd.validateDomainVersion(version)

        # Make sure the underlying file system is mounted
        if not mount.isMounted(domPath):
            raise se.StorageDomainFSNotMounted(domPath)

        fileSD.validateDirAccess(domPath)

        # Make sure there are no remnants of other domain
        mdpat = os.path.join(domPath, "*", sd.DOMAIN_META_DATA)
        if len(oop.getProcessPool(sdUUID).glob.glob(mdpat)) > 0:
            raise se.StorageDomainNotEmpty(typeSpecificArg)
예제 #8
0
    def _preCreateValidation(cls, sdUUID, domPath, typeSpecificArg,
                             storageType, version):
        # Some trivial resource validation
        # TODO Checking storageType==nfs in the nfs class is not clean
        if storageType == sd.NFS_DOMAIN and ":" not in typeSpecificArg:
            raise se.StorageDomainIllegalRemotePath(typeSpecificArg)

        sd.validateDomainVersion(version)

        # Make sure the underlying file system is mounted
        if not mount.isMounted(domPath):
            raise se.StorageDomainFSNotMounted(domPath)

        fileSD.validateDirAccess(domPath)
        fileSD.validateFileSystemFeatures(sdUUID, domPath)

        # Make sure there are no remnants of other domain
        mdpat = os.path.join(domPath, "*", sd.DOMAIN_META_DATA)
        if len(oop.getProcessPool(sdUUID).glob.glob(mdpat)) > 0:
            raise se.StorageDomainNotEmpty(typeSpecificArg)
예제 #9
0
파일: blockSD.py 프로젝트: humblec/vdsm
 def validateMasterMount(self):
     return mount.isMounted(self.getMasterDir())
예제 #10
0
파일: blockSD.py 프로젝트: oVirtorg/vdsm
 def validateMasterMount(self):
     return mount.isMounted(self.getMasterDir())