Exemplo n.º 1
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)
Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 4
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)
Exemplo n.º 5
0
Arquivo: nfsSD.py Projeto: 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)
Exemplo n.º 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)
Exemplo n.º 7
0
Arquivo: nfsSD.py Projeto: 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)
Exemplo n.º 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)
Exemplo n.º 9
0
 def validateMasterMount(self):
     return mount.isMounted(self.getMasterDir())
Exemplo n.º 10
0
 def validateMasterMount(self):
     return mount.isMounted(self.getMasterDir())