Search in sources :

Example 21 with PrimaryDataStore

use of org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStore in project cloudstack by apache.

the class DirectDownloadManagerImpl method downloadTemplate.

@Override
public void downloadTemplate(long templateId, long poolId, long hostId) {
    VMTemplateVO template = vmTemplateDao.findById(templateId);
    StoragePoolVO pool = primaryDataStoreDao.findById(poolId);
    HostVO host = hostDao.findById(hostId);
    if (pool == null) {
        throw new CloudRuntimeException("Storage pool " + poolId + " could not be found");
    }
    if (template == null) {
        throw new CloudRuntimeException("Template " + templateId + " could not be found");
    }
    if (host == null) {
        throw new CloudRuntimeException("Host " + hostId + " could not be found");
    }
    if (!template.isDirectDownload()) {
        throw new CloudRuntimeException("Template " + templateId + " is not marked for direct download");
    }
    Map<String, String> details = template.getDetails();
    String url = template.getUrl();
    String checksum = template.getChecksum();
    Map<String, String> headers = getHeadersFromDetails(details);
    DataStore store = dataStoreManager.getDataStore(poolId, DataStoreRole.Primary);
    if (store == null) {
        throw new CloudRuntimeException("Data store " + poolId + " could not be found");
    }
    PrimaryDataStore primaryDataStore = (PrimaryDataStore) store;
    PrimaryDataStoreTO to = (PrimaryDataStoreTO) primaryDataStore.getTO();
    DownloadProtocol protocol = getProtocolFromUrl(url);
    DirectDownloadCommand cmd = getDirectDownloadCommandFromProtocol(protocol, url, templateId, to, checksum, headers);
    cmd.setTemplateSize(template.getSize());
    cmd.setFormat(template.getFormat());
    if (tmplFactory.getTemplate(templateId, store) != null) {
        cmd.setDestData((TemplateObjectTO) tmplFactory.getTemplate(templateId, store).getTO());
    }
    int cmdTimeOut = StorageManager.PRIMARY_STORAGE_DOWNLOAD_WAIT.value();
    cmd.setWait(cmdTimeOut);
    Answer answer = sendDirectDownloadCommand(cmd, template, poolId, host);
    VMTemplateStoragePoolVO sPoolRef = vmTemplatePoolDao.findByPoolTemplate(poolId, templateId, null);
    if (sPoolRef == null) {
        if (s_logger.isDebugEnabled()) {
            s_logger.debug("Not found (templateId:" + templateId + " poolId: " + poolId + ") in template_spool_ref, persisting it");
        }
        DirectDownloadAnswer ans = (DirectDownloadAnswer) answer;
        sPoolRef = new VMTemplateStoragePoolVO(poolId, templateId, null);
        sPoolRef.setDownloadPercent(100);
        sPoolRef.setDownloadState(VMTemplateStorageResourceAssoc.Status.DOWNLOADED);
        sPoolRef.setState(ObjectInDataStoreStateMachine.State.Ready);
        sPoolRef.setTemplateSize(ans.getTemplateSize());
        sPoolRef.setLocalDownloadPath(ans.getInstallPath());
        sPoolRef.setInstallPath(ans.getInstallPath());
        vmTemplatePoolDao.persist(sPoolRef);
    } else {
        // For managed storage, update after template downloaded and copied to the disk
        DirectDownloadAnswer ans = (DirectDownloadAnswer) answer;
        sPoolRef.setDownloadPercent(100);
        sPoolRef.setDownloadState(VMTemplateStorageResourceAssoc.Status.DOWNLOADED);
        sPoolRef.setState(ObjectInDataStoreStateMachine.State.Ready);
        sPoolRef.setTemplateSize(ans.getTemplateSize());
        sPoolRef.setLocalDownloadPath(ans.getInstallPath());
        sPoolRef.setInstallPath(ans.getInstallPath());
        vmTemplatePoolDao.update(sPoolRef.getId(), sPoolRef);
    }
}
Also used : DirectDownloadCommand(org.apache.cloudstack.agent.directdownload.DirectDownloadCommand) HttpDirectDownloadCommand(org.apache.cloudstack.agent.directdownload.HttpDirectDownloadCommand) MetalinkDirectDownloadCommand(org.apache.cloudstack.agent.directdownload.MetalinkDirectDownloadCommand) HttpsDirectDownloadCommand(org.apache.cloudstack.agent.directdownload.HttpsDirectDownloadCommand) NfsDirectDownloadCommand(org.apache.cloudstack.agent.directdownload.NfsDirectDownloadCommand) VMTemplateVO(com.cloud.storage.VMTemplateVO) HostVO(com.cloud.host.HostVO) VMTemplateStoragePoolVO(com.cloud.storage.VMTemplateStoragePoolVO) Answer(com.cloud.agent.api.Answer) DirectDownloadAnswer(org.apache.cloudstack.agent.directdownload.DirectDownloadAnswer) PrimaryDataStoreTO(org.apache.cloudstack.storage.to.PrimaryDataStoreTO) CloudRuntimeException(com.cloud.utils.exception.CloudRuntimeException) DownloadProtocol(org.apache.cloudstack.agent.directdownload.DirectDownloadCommand.DownloadProtocol) DirectDownloadAnswer(org.apache.cloudstack.agent.directdownload.DirectDownloadAnswer) DataStore(org.apache.cloudstack.engine.subsystem.api.storage.DataStore) PrimaryDataStore(org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStore) VMTemplateStoragePoolVO(com.cloud.storage.VMTemplateStoragePoolVO) StoragePoolVO(org.apache.cloudstack.storage.datastore.db.StoragePoolVO) PrimaryDataStore(org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStore)

Example 22 with PrimaryDataStore

use of org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStore in project cloudstack by apache.

the class VolumeServiceImpl method copyVolume.

@Override
public AsyncCallFuture<VolumeApiResult> copyVolume(VolumeInfo srcVolume, DataStore destStore) {
    DataStore srcStore = srcVolume.getDataStore();
    if (s_logger.isDebugEnabled()) {
        String srcRole = (srcStore != null && srcStore.getRole() != null ? srcVolume.getDataStore().getRole().toString() : "<unknown role>");
        String msg = String.format("copying %s(id=%d, role=%s) to %s (id=%d, role=%s)", srcVolume.getName(), srcVolume.getId(), srcRole, destStore.getName(), destStore.getId(), destStore.getRole());
        s_logger.debug(msg);
    }
    if (srcVolume.getState() == Volume.State.Uploaded) {
        return copyVolumeFromImageToPrimary(srcVolume, destStore);
    }
    if (destStore.getRole() == DataStoreRole.Image) {
        return copyVolumeFromPrimaryToImage(srcVolume, destStore);
    }
    if (srcStore.getRole() == DataStoreRole.Primary && destStore.getRole() == DataStoreRole.Primary && ((PrimaryDataStore) destStore).isManaged() && requiresNewManagedVolumeInDestStore((PrimaryDataStore) srcStore, (PrimaryDataStore) destStore)) {
        return copyManagedVolume(srcVolume, destStore);
    }
    // OfflineVmwareMigration: aren't we missing secondary to secondary in this logic?
    AsyncCallFuture<VolumeApiResult> future = new AsyncCallFuture<VolumeApiResult>();
    VolumeApiResult res = new VolumeApiResult(srcVolume);
    try {
        if (!snapshotMgr.canOperateOnVolume(srcVolume)) {
            s_logger.debug("There are snapshots creating on this volume, can not move this volume");
            res.setResult("There are snapshots creating on this volume, can not move this volume");
            future.complete(res);
            return future;
        }
        VolumeVO destVol = duplicateVolumeOnAnotherStorage(srcVolume, (StoragePool) destStore);
        VolumeInfo destVolume = volFactory.getVolume(destVol.getId(), destStore);
        destVolume.processEvent(Event.MigrationCopyRequested);
        srcVolume.processEvent(Event.MigrationRequested);
        CopyVolumeContext<VolumeApiResult> context = new CopyVolumeContext<VolumeApiResult>(null, future, srcVolume, destVolume, destStore);
        AsyncCallbackDispatcher<VolumeServiceImpl, CopyCommandResult> caller = AsyncCallbackDispatcher.create(this);
        caller.setCallback(caller.getTarget().copyVolumeCallBack(null, null)).setContext(context);
        motionSrv.copyAsync(srcVolume, destVolume, caller);
    } catch (Exception e) {
        s_logger.error("Failed to copy volume:" + e);
        if (s_logger.isDebugEnabled()) {
            s_logger.debug("Failed to copy volume.", e);
        }
        res.setResult(e.toString());
        future.complete(res);
    }
    return future;
}
Also used : VolumeInfo(org.apache.cloudstack.engine.subsystem.api.storage.VolumeInfo) CloudRuntimeException(com.cloud.utils.exception.CloudRuntimeException) StorageAccessException(com.cloud.exception.StorageAccessException) ExecutionException(java.util.concurrent.ExecutionException) ResourceAllocationException(com.cloud.exception.ResourceAllocationException) AsyncCallFuture(org.apache.cloudstack.framework.async.AsyncCallFuture) VolumeVO(com.cloud.storage.VolumeVO) PrimaryDataStore(org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStore) DataStore(org.apache.cloudstack.engine.subsystem.api.storage.DataStore) CopyCommandResult(org.apache.cloudstack.engine.subsystem.api.storage.CopyCommandResult) PrimaryDataStore(org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStore)

Example 23 with PrimaryDataStore

use of org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStore in project cloudstack by apache.

the class VolumeServiceImpl method createManagedStorageVolumeFromTemplateAsync.

@Override
public AsyncCallFuture<VolumeApiResult> createManagedStorageVolumeFromTemplateAsync(VolumeInfo volumeInfo, long destDataStoreId, TemplateInfo srcTemplateInfo, long destHostId) throws StorageAccessException {
    PrimaryDataStore destPrimaryDataStore = dataStoreMgr.getPrimaryDataStore(destDataStoreId);
    Host destHost = _hostDao.findById(destHostId);
    if (destHost == null) {
        throw new CloudRuntimeException("Destination host should not be null.");
    }
    Boolean storageCanCloneVolume = new Boolean(destPrimaryDataStore.getDriver().getCapabilities().get(DataStoreCapabilities.CAN_CREATE_VOLUME_FROM_VOLUME.toString()));
    boolean computeSupportsVolumeClone = computeSupportsVolumeClone(destHost.getDataCenterId(), destHost.getHypervisorType());
    AsyncCallFuture<VolumeApiResult> future = new AsyncCallFuture<>();
    if (storageCanCloneVolume && computeSupportsVolumeClone) {
        s_logger.debug("Storage " + destDataStoreId + " can support cloning using a cached template and compute side is OK with volume cloning.");
        GlobalLock lock = null;
        TemplateInfo templateOnPrimary = null;
        try {
            String tmplIdManagedPoolIdLockString = "tmplId:" + srcTemplateInfo.getId() + "managedPoolId:" + destDataStoreId;
            lock = GlobalLock.getInternLock(tmplIdManagedPoolIdLockString);
            if (lock == null) {
                throw new CloudRuntimeException("Unable to create managed storage template/volume, couldn't get global lock on " + tmplIdManagedPoolIdLockString);
            }
            int storagePoolMaxWaitSeconds = NumbersUtil.parseInt(configDao.getValue(Config.StoragePoolMaxWaitSeconds.key()), 3600);
            if (!lock.lock(storagePoolMaxWaitSeconds)) {
                s_logger.debug("Unable to create managed storage template/volume, couldn't lock on " + tmplIdManagedPoolIdLockString);
                throw new CloudRuntimeException("Unable to create managed storage template/volume, couldn't lock on " + tmplIdManagedPoolIdLockString);
            }
            templateOnPrimary = destPrimaryDataStore.getTemplate(srcTemplateInfo.getId(), null);
            if (templateOnPrimary == null) {
                templateOnPrimary = createManagedTemplateVolume(srcTemplateInfo, destPrimaryDataStore);
                if (templateOnPrimary == null) {
                    throw new CloudRuntimeException("Failed to create template " + srcTemplateInfo.getUniqueName() + " on primary storage: " + destDataStoreId);
                }
            }
            // Copy the template to the template volume.
            VMTemplateStoragePoolVO templatePoolRef = _tmpltPoolDao.findByPoolTemplate(destPrimaryDataStore.getId(), templateOnPrimary.getId(), null);
            if (templatePoolRef == null) {
                throw new CloudRuntimeException("Failed to find template " + srcTemplateInfo.getUniqueName() + " in storage pool " + destPrimaryDataStore.getId());
            }
            if (templatePoolRef.getDownloadState() == Status.NOT_DOWNLOADED) {
                copyTemplateToManagedTemplateVolume(srcTemplateInfo, templateOnPrimary, templatePoolRef, destPrimaryDataStore, destHost);
            }
        } finally {
            if (lock != null) {
                lock.unlock();
                lock.releaseRef();
            }
        }
        if (destPrimaryDataStore.getPoolType() != StoragePoolType.PowerFlex) {
            // We have a template on primary storage. Clone it to new volume.
            s_logger.debug("Creating a clone from template on primary storage " + destDataStoreId);
            createManagedVolumeCloneTemplateAsync(volumeInfo, templateOnPrimary, destPrimaryDataStore, future);
        } else {
            // We have a template on PowerFlex primary storage. Create new volume and copy to it.
            s_logger.debug("Copying the template to the volume on primary storage");
            createManagedVolumeCopyManagedTemplateAsync(volumeInfo, destPrimaryDataStore, templateOnPrimary, destHost, future);
        }
    } else {
        s_logger.debug("Primary storage does not support cloning or no support for UUID resigning on the host side; copying the template normally");
        createManagedVolumeCopyTemplateAsync(volumeInfo, destPrimaryDataStore, srcTemplateInfo, destHost, future);
    }
    return future;
}
Also used : Host(com.cloud.host.Host) EndPoint(org.apache.cloudstack.engine.subsystem.api.storage.EndPoint) RemoteHostEndPoint(org.apache.cloudstack.storage.RemoteHostEndPoint) GlobalLock(com.cloud.utils.db.GlobalLock) VMTemplateStoragePoolVO(com.cloud.storage.VMTemplateStoragePoolVO) AsyncCallFuture(org.apache.cloudstack.framework.async.AsyncCallFuture) TemplateInfo(org.apache.cloudstack.engine.subsystem.api.storage.TemplateInfo) CloudRuntimeException(com.cloud.utils.exception.CloudRuntimeException) PrimaryDataStore(org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStore)

Example 24 with PrimaryDataStore

use of org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStore in project cloudstack by apache.

the class VolumeServiceImpl method createManagedStorageTemplate.

@Override
public TemplateInfo createManagedStorageTemplate(long srcTemplateId, long destDataStoreId, long destHostId) throws StorageAccessException {
    Host destHost = _hostDao.findById(destHostId);
    if (destHost == null) {
        throw new CloudRuntimeException("Destination host should not be null.");
    }
    TemplateInfo srcTemplateInfo = tmplFactory.getTemplate(srcTemplateId);
    if (srcTemplateInfo == null) {
        throw new CloudRuntimeException("Failed to get info of template: " + srcTemplateId);
    }
    if (Storage.ImageFormat.ISO.equals(srcTemplateInfo.getFormat())) {
        throw new CloudRuntimeException("Unsupported format: " + Storage.ImageFormat.ISO.toString() + " for managed storage template");
    }
    GlobalLock lock = null;
    TemplateInfo templateOnPrimary = null;
    try {
        String templateIdManagedPoolIdLockString = "templateId:" + srcTemplateId + "managedPoolId:" + destDataStoreId;
        lock = GlobalLock.getInternLock(templateIdManagedPoolIdLockString);
        if (lock == null) {
            throw new CloudRuntimeException("Unable to create managed storage template, couldn't get global lock on " + templateIdManagedPoolIdLockString);
        }
        int storagePoolMaxWaitSeconds = NumbersUtil.parseInt(configDao.getValue(Config.StoragePoolMaxWaitSeconds.key()), 3600);
        if (!lock.lock(storagePoolMaxWaitSeconds)) {
            s_logger.debug("Unable to create managed storage template, couldn't lock on " + templateIdManagedPoolIdLockString);
            throw new CloudRuntimeException("Unable to create managed storage template, couldn't lock on " + templateIdManagedPoolIdLockString);
        }
        PrimaryDataStore destPrimaryDataStore = dataStoreMgr.getPrimaryDataStore(destDataStoreId);
        // Check if template exists on the storage pool. If not, downland and copy to managed storage pool
        VMTemplateStoragePoolVO templatePoolRef = _tmpltPoolDao.findByPoolTemplate(destDataStoreId, srcTemplateId, null);
        if (templatePoolRef != null && templatePoolRef.getDownloadState() == Status.DOWNLOADED) {
            return tmplFactory.getTemplate(srcTemplateId, destPrimaryDataStore);
        }
        templateOnPrimary = createManagedTemplateVolume(srcTemplateInfo, destPrimaryDataStore);
        if (templateOnPrimary == null) {
            throw new CloudRuntimeException("Failed to create template " + srcTemplateInfo.getUniqueName() + " on primary storage: " + destDataStoreId);
        }
        templatePoolRef = _tmpltPoolDao.findByPoolTemplate(destPrimaryDataStore.getId(), templateOnPrimary.getId(), null);
        if (templatePoolRef == null) {
            throw new CloudRuntimeException("Failed to find template " + srcTemplateInfo.getUniqueName() + " in storage pool " + destPrimaryDataStore.getId());
        }
        if (templatePoolRef.getDownloadState() == Status.NOT_DOWNLOADED) {
            // Populate details which will be later read by the storage subsystem.
            Map<String, String> details = new HashMap<>();
            details.put(PrimaryDataStore.MANAGED, Boolean.TRUE.toString());
            details.put(PrimaryDataStore.STORAGE_HOST, destPrimaryDataStore.getHostAddress());
            details.put(PrimaryDataStore.STORAGE_PORT, String.valueOf(destPrimaryDataStore.getPort()));
            details.put(PrimaryDataStore.MANAGED_STORE_TARGET, templateOnPrimary.getInstallPath());
            details.put(PrimaryDataStore.MANAGED_STORE_TARGET_ROOT_VOLUME, srcTemplateInfo.getUniqueName());
            details.put(PrimaryDataStore.REMOVE_AFTER_COPY, Boolean.TRUE.toString());
            details.put(PrimaryDataStore.VOLUME_SIZE, String.valueOf(templateOnPrimary.getSize()));
            details.put(StorageManager.STORAGE_POOL_DISK_WAIT.toString(), String.valueOf(StorageManager.STORAGE_POOL_DISK_WAIT.valueIn(destPrimaryDataStore.getId())));
            destPrimaryDataStore.setDetails(details);
            try {
                grantAccess(templateOnPrimary, destHost, destPrimaryDataStore);
            } catch (Exception e) {
                throw new StorageAccessException("Unable to grant access to template: " + templateOnPrimary.getId() + " on host: " + destHost.getId());
            }
            templateOnPrimary.processEvent(Event.CopyingRequested);
            try {
                // Download and copy template to the managed volume
                TemplateInfo templateOnPrimaryNow = tmplFactory.getReadyBypassedTemplateOnManagedStorage(srcTemplateId, templateOnPrimary, destDataStoreId, destHostId);
                if (templateOnPrimaryNow == null) {
                    s_logger.debug("Failed to prepare ready bypassed template: " + srcTemplateId + " on primary storage: " + templateOnPrimary.getId());
                    throw new CloudRuntimeException("Failed to prepare ready bypassed template: " + srcTemplateId + " on primary storage: " + templateOnPrimary.getId());
                }
                templateOnPrimary.processEvent(Event.OperationSuccessed);
                return templateOnPrimaryNow;
            } finally {
                revokeAccess(templateOnPrimary, destHost, destPrimaryDataStore);
            }
        }
        return null;
    } catch (StorageAccessException e) {
        throw e;
    } catch (Throwable e) {
        s_logger.debug("Failed to create template on managed primary storage", e);
        if (templateOnPrimary != null) {
            templateOnPrimary.processEvent(Event.OperationFailed);
        }
        throw new CloudRuntimeException(e.getMessage());
    } finally {
        if (lock != null) {
            lock.unlock();
            lock.releaseRef();
        }
    }
}
Also used : HashMap(java.util.HashMap) Host(com.cloud.host.Host) StorageAccessException(com.cloud.exception.StorageAccessException) EndPoint(org.apache.cloudstack.engine.subsystem.api.storage.EndPoint) RemoteHostEndPoint(org.apache.cloudstack.storage.RemoteHostEndPoint) CloudRuntimeException(com.cloud.utils.exception.CloudRuntimeException) StorageAccessException(com.cloud.exception.StorageAccessException) ExecutionException(java.util.concurrent.ExecutionException) ResourceAllocationException(com.cloud.exception.ResourceAllocationException) GlobalLock(com.cloud.utils.db.GlobalLock) VMTemplateStoragePoolVO(com.cloud.storage.VMTemplateStoragePoolVO) TemplateInfo(org.apache.cloudstack.engine.subsystem.api.storage.TemplateInfo) CloudRuntimeException(com.cloud.utils.exception.CloudRuntimeException) PrimaryDataStore(org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStore)

Example 25 with PrimaryDataStore

use of org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStore in project cloudstack by apache.

the class VolumeServiceImpl method resizeVolumeOnHypervisor.

@Override
public void resizeVolumeOnHypervisor(long volumeId, long newSize, long destHostId, String instanceName) {
    final String errMsg = "Resize command failed";
    try {
        Answer answer = null;
        Host destHost = _hostDao.findById(destHostId);
        EndPoint ep = RemoteHostEndPoint.getHypervisorHostEndPoint(destHost);
        if (ep != null) {
            VolumeVO volume = volDao.findById(volumeId);
            PrimaryDataStore primaryDataStore = this.dataStoreMgr.getPrimaryDataStore(volume.getPoolId());
            ResizeVolumeCommand resizeCmd = new ResizeVolumeCommand(volume.getPath(), new StorageFilerTO(primaryDataStore), volume.getSize(), newSize, true, instanceName, primaryDataStore.isManaged(), volume.get_iScsiName());
            answer = ep.sendMessage(resizeCmd);
        } else {
            throw new CloudRuntimeException("Could not find a remote endpoint to send command to. Check if host or SSVM is down.");
        }
        if (answer == null || !answer.getResult()) {
            throw new CloudRuntimeException(answer != null ? answer.getDetails() : errMsg);
        }
    } catch (Exception e) {
        throw new CloudRuntimeException(errMsg, e);
    }
}
Also used : CopyCmdAnswer(org.apache.cloudstack.storage.command.CopyCmdAnswer) ListVolumeAnswer(com.cloud.agent.api.storage.ListVolumeAnswer) Answer(com.cloud.agent.api.Answer) VolumeVO(com.cloud.storage.VolumeVO) CloudRuntimeException(com.cloud.utils.exception.CloudRuntimeException) ResizeVolumeCommand(com.cloud.agent.api.storage.ResizeVolumeCommand) Host(com.cloud.host.Host) EndPoint(org.apache.cloudstack.engine.subsystem.api.storage.EndPoint) RemoteHostEndPoint(org.apache.cloudstack.storage.RemoteHostEndPoint) StorageFilerTO(com.cloud.agent.api.to.StorageFilerTO) CloudRuntimeException(com.cloud.utils.exception.CloudRuntimeException) StorageAccessException(com.cloud.exception.StorageAccessException) ExecutionException(java.util.concurrent.ExecutionException) ResourceAllocationException(com.cloud.exception.ResourceAllocationException) PrimaryDataStore(org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStore)

Aggregations

PrimaryDataStore (org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStore)25 VMTemplateStoragePoolVO (com.cloud.storage.VMTemplateStoragePoolVO)14 StoragePoolVO (org.apache.cloudstack.storage.datastore.db.StoragePoolVO)13 CloudRuntimeException (com.cloud.utils.exception.CloudRuntimeException)11 DataStore (org.apache.cloudstack.engine.subsystem.api.storage.DataStore)9 ExecutionException (java.util.concurrent.ExecutionException)8 Test (org.junit.Test)8 VMTemplateVO (com.cloud.storage.VMTemplateVO)7 VolumeVO (com.cloud.storage.VolumeVO)7 VolumeInfo (org.apache.cloudstack.engine.subsystem.api.storage.VolumeInfo)7 ResourceAllocationException (com.cloud.exception.ResourceAllocationException)6 StorageAccessException (com.cloud.exception.StorageAccessException)6 Host (com.cloud.host.Host)6 TemplateInfo (org.apache.cloudstack.engine.subsystem.api.storage.TemplateInfo)6 Answer (com.cloud.agent.api.Answer)5 AsyncCallFuture (org.apache.cloudstack.framework.async.AsyncCallFuture)5 ArrayList (java.util.ArrayList)4 StorageUnavailableException (com.cloud.exception.StorageUnavailableException)3 CopyCommandResult (org.apache.cloudstack.engine.subsystem.api.storage.CopyCommandResult)3 EndPoint (org.apache.cloudstack.engine.subsystem.api.storage.EndPoint)3