Search in sources :

Example 1 with RadosException

use of com.ceph.rados.exceptions.RadosException in project YCSB by brianfrankcooper.

the class RadosClient method init.

public void init() throws DBException {
    Properties props = getProperties();
    String configfile = props.getProperty(CONFIG_FILE_PROPERTY);
    if (configfile == null) {
        configfile = CONFIG_FILE_DEFAULT;
    }
    String id = props.getProperty(ID_PROPERTY);
    if (id == null) {
        id = ID_DEFAULT;
    }
    String pool = props.getProperty(POOL_PROPERTY);
    if (pool == null) {
        pool = POOL_DEFAULT;
    }
    // try {
    // } catch (UnsatisfiedLinkError e) {
    //   throw new DBException("RADOS library is not loaded.");
    // }
    rados = new Rados(id);
    try {
        rados.confReadFile(new File(configfile));
        rados.connect();
        ioctx = rados.ioCtxCreate(pool);
    } catch (RadosException e) {
        throw new DBException(e.getMessage() + ": " + e.getReturnValue());
    }
    isInited = true;
}
Also used : DBException(com.yahoo.ycsb.DBException) Rados(com.ceph.rados.Rados) RadosException(com.ceph.rados.exceptions.RadosException) Properties(java.util.Properties) File(java.io.File)

Example 2 with RadosException

use of com.ceph.rados.exceptions.RadosException in project YCSB by brianfrankcooper.

the class RadosClient method read.

@Override
public Status read(String table, String key, Set<String> fields, HashMap<String, ByteIterator> result) {
    byte[] buffer;
    try {
        RadosObjectInfo info = ioctx.stat(key);
        buffer = new byte[(int) info.getSize()];
        ReadOp rop = ioctx.readOpCreate();
        ReadResult readResult = rop.queueRead(0, info.getSize());
        // TODO: more size than byte length possible;
        // rop.operate(key, Rados.OPERATION_NOFLAG); // for rados-java 0.3.0
        rop.operate(key, 0);
        // readResult.raiseExceptionOnError("Error ReadOP(%d)", readResult.getRVal()); // for rados-java 0.3.0
        if (readResult.getRVal() < 0) {
            throw new RadosException("Error ReadOP", readResult.getRVal());
        }
        if (info.getSize() != readResult.getBytesRead()) {
            return new Status("ERROR", "Error the object size read");
        }
        readResult.getBuffer().get(buffer);
    } catch (RadosException e) {
        return new Status("ERROR-" + e.getReturnValue(), e.getMessage());
    }
    JSONObject json = new JSONObject(new String(buffer, java.nio.charset.StandardCharsets.UTF_8));
    Set<String> fieldsToReturn = (fields == null ? json.keySet() : fields);
    for (String name : fieldsToReturn) {
        result.put(name, new StringByteIterator(json.getString(name)));
    }
    return result.isEmpty() ? Status.ERROR : Status.OK;
}
Also used : RadosObjectInfo(com.ceph.rados.jna.RadosObjectInfo) Status(com.yahoo.ycsb.Status) JSONObject(org.json.JSONObject) StringByteIterator(com.yahoo.ycsb.StringByteIterator) ReadResult(com.ceph.rados.ReadOp.ReadResult) RadosException(com.ceph.rados.exceptions.RadosException) ReadOp(com.ceph.rados.ReadOp)

Example 3 with RadosException

use of com.ceph.rados.exceptions.RadosException in project cloudstack by apache.

the class LibvirtStorageAdaptor method copyPhysicalDisk.

/**
     * This copies a volume from Primary Storage to Secondary Storage
     *
     * In theory it could also do it the other way around, but the current implementation
     * in ManagementServerImpl shows that the destPool is always a Secondary Storage Pool
     */
@Override
public KVMPhysicalDisk copyPhysicalDisk(KVMPhysicalDisk disk, String name, KVMStoragePool destPool, int timeout) {
    /**
            With RBD you can't run qemu-img convert with an existing RBD image as destination
            qemu-img will exit with the error that the destination already exists.
            So for RBD we don't create the image, but let qemu-img do that for us.

            We then create a KVMPhysicalDisk object that we can return

            It is however very unlikely that the destPool will be RBD, since it isn't supported
            for Secondary Storage
         */
    KVMStoragePool srcPool = disk.getPool();
    PhysicalDiskFormat sourceFormat = disk.getFormat();
    String sourcePath = disk.getPath();
    KVMPhysicalDisk newDisk;
    s_logger.debug("copyPhysicalDisk: disk size:" + disk.getSize() + ", virtualsize:" + disk.getVirtualSize() + " format:" + disk.getFormat());
    if (destPool.getType() != StoragePoolType.RBD) {
        if (disk.getFormat() == PhysicalDiskFormat.TAR) {
            newDisk = destPool.createPhysicalDisk(name, PhysicalDiskFormat.DIR, Storage.ProvisioningType.THIN, disk.getVirtualSize());
        } else {
            newDisk = destPool.createPhysicalDisk(name, Storage.ProvisioningType.THIN, disk.getVirtualSize());
        }
    } else {
        newDisk = new KVMPhysicalDisk(destPool.getSourceDir() + "/" + name, name, destPool);
        newDisk.setFormat(PhysicalDiskFormat.RAW);
        newDisk.setSize(disk.getVirtualSize());
        newDisk.setVirtualSize(disk.getSize());
    }
    String destPath = newDisk.getPath();
    PhysicalDiskFormat destFormat = newDisk.getFormat();
    QemuImg qemu = new QemuImg(timeout);
    QemuImgFile srcFile = null;
    QemuImgFile destFile = null;
    if ((srcPool.getType() != StoragePoolType.RBD) && (destPool.getType() != StoragePoolType.RBD)) {
        if (sourceFormat == PhysicalDiskFormat.TAR && destFormat == PhysicalDiskFormat.DIR) {
            //LXC template
            Script.runSimpleBashScript("cp " + sourcePath + " " + destPath);
        } else if (sourceFormat == PhysicalDiskFormat.TAR) {
            Script.runSimpleBashScript("tar -x -f " + sourcePath + " -C " + destPath, timeout);
        } else if (sourceFormat == PhysicalDiskFormat.DIR) {
            Script.runSimpleBashScript("mkdir -p " + destPath);
            Script.runSimpleBashScript("chmod 755 " + destPath);
            Script.runSimpleBashScript("cp -p -r " + sourcePath + "/* " + destPath, timeout);
        } else {
            srcFile = new QemuImgFile(sourcePath, sourceFormat);
            try {
                Map<String, String> info = qemu.info(srcFile);
                String backingFile = info.get(new String("backing_file"));
                // qcow2 templates can just be copied into place
                if (sourceFormat.equals(destFormat) && backingFile == null && sourcePath.endsWith(".qcow2")) {
                    String result = Script.runSimpleBashScript("cp -f " + sourcePath + " " + destPath, timeout);
                    if (result != null) {
                        throw new CloudRuntimeException("Failed to create disk: " + result);
                    }
                } else {
                    destFile = new QemuImgFile(destPath, destFormat);
                    try {
                        qemu.convert(srcFile, destFile);
                        Map<String, String> destInfo = qemu.info(destFile);
                        Long virtualSize = Long.parseLong(destInfo.get(new String("virtual_size")));
                        newDisk.setVirtualSize(virtualSize);
                        newDisk.setSize(virtualSize);
                    } catch (QemuImgException e) {
                        s_logger.error("Failed to convert " + srcFile.getFileName() + " to " + destFile.getFileName() + " the error was: " + e.getMessage());
                        newDisk = null;
                    }
                }
            } catch (QemuImgException e) {
                s_logger.error("Failed to fetch the information of file " + srcFile.getFileName() + " the error was: " + e.getMessage());
                newDisk = null;
            }
        }
    } else if ((srcPool.getType() != StoragePoolType.RBD) && (destPool.getType() == StoragePoolType.RBD)) {
        /**
             * Using qemu-img we copy the QCOW2 disk to RAW (on RBD) directly.
             * To do so it's mandatory that librbd on the system is at least 0.67.7 (Ceph Dumpling)
             */
        s_logger.debug("The source image is not RBD, but the destination is. We will convert into RBD format 2");
        try {
            srcFile = new QemuImgFile(sourcePath, sourceFormat);
            String rbdDestPath = destPool.getSourceDir() + "/" + name;
            String rbdDestFile = KVMPhysicalDisk.RBDStringBuilder(destPool.getSourceHost(), destPool.getSourcePort(), destPool.getAuthUserName(), destPool.getAuthSecret(), rbdDestPath);
            destFile = new QemuImgFile(rbdDestFile, destFormat);
            s_logger.debug("Starting copy from source image " + srcFile.getFileName() + " to RBD image " + rbdDestPath);
            qemu.convert(srcFile, destFile);
            s_logger.debug("Succesfully converted source image " + srcFile.getFileName() + " to RBD image " + rbdDestPath);
            /* We have to stat the RBD image to see how big it became afterwards */
            Rados r = new Rados(destPool.getAuthUserName());
            r.confSet("mon_host", destPool.getSourceHost() + ":" + destPool.getSourcePort());
            r.confSet("key", destPool.getAuthSecret());
            r.confSet("client_mount_timeout", "30");
            r.connect();
            s_logger.debug("Succesfully connected to Ceph cluster at " + r.confGet("mon_host"));
            IoCTX io = r.ioCtxCreate(destPool.getSourceDir());
            Rbd rbd = new Rbd(io);
            RbdImage image = rbd.open(name);
            RbdImageInfo rbdInfo = image.stat();
            newDisk.setSize(rbdInfo.size);
            newDisk.setVirtualSize(rbdInfo.size);
            s_logger.debug("After copy the resulting RBD image " + rbdDestPath + " is " + rbdInfo.size + " bytes long");
            rbd.close(image);
            r.ioCtxDestroy(io);
        } catch (QemuImgException e) {
            s_logger.error("Failed to convert from " + srcFile.getFileName() + " to " + destFile.getFileName() + " the error was: " + e.getMessage());
            newDisk = null;
        } catch (RadosException e) {
            s_logger.error("A Ceph RADOS operation failed (" + e.getReturnValue() + "). The error was: " + e.getMessage());
            newDisk = null;
        } catch (RbdException e) {
            s_logger.error("A Ceph RBD operation failed (" + e.getReturnValue() + "). The error was: " + e.getMessage());
            newDisk = null;
        }
    } else {
        /**
                We let Qemu-Img do the work here. Although we could work with librbd and have that do the cloning
                it doesn't benefit us. It's better to keep the current code in place which works
             */
        srcFile = new QemuImgFile(KVMPhysicalDisk.RBDStringBuilder(srcPool.getSourceHost(), srcPool.getSourcePort(), srcPool.getAuthUserName(), srcPool.getAuthSecret(), sourcePath));
        srcFile.setFormat(sourceFormat);
        destFile = new QemuImgFile(destPath);
        destFile.setFormat(destFormat);
        try {
            qemu.convert(srcFile, destFile);
        } catch (QemuImgException e) {
            s_logger.error("Failed to convert " + srcFile.getFileName() + " to " + destFile.getFileName() + " the error was: " + e.getMessage());
            newDisk = null;
        }
    }
    if (newDisk == null) {
        throw new CloudRuntimeException("Failed to copy " + disk.getPath() + " to " + name);
    }
    return newDisk;
}
Also used : Rados(com.ceph.rados.Rados) RadosException(com.ceph.rados.exceptions.RadosException) RbdImageInfo(com.ceph.rbd.jna.RbdImageInfo) PhysicalDiskFormat(org.apache.cloudstack.utils.qemu.QemuImg.PhysicalDiskFormat) QemuImg(org.apache.cloudstack.utils.qemu.QemuImg) QemuImgFile(org.apache.cloudstack.utils.qemu.QemuImgFile) Rbd(com.ceph.rbd.Rbd) CloudRuntimeException(com.cloud.utils.exception.CloudRuntimeException) QemuImgException(org.apache.cloudstack.utils.qemu.QemuImgException) RbdImage(com.ceph.rbd.RbdImage) IoCTX(com.ceph.rados.IoCTX) RbdException(com.ceph.rbd.RbdException)

Example 4 with RadosException

use of com.ceph.rados.exceptions.RadosException in project cloudstack by apache.

the class LibvirtStorageAdaptor method createDiskFromTemplateOnRBD.

private KVMPhysicalDisk createDiskFromTemplateOnRBD(KVMPhysicalDisk template, String name, PhysicalDiskFormat format, Storage.ProvisioningType provisioningType, long size, KVMStoragePool destPool, int timeout) {
    /*
            With RBD you can't run qemu-img convert with an existing RBD image as destination
            qemu-img will exit with the error that the destination already exists.
            So for RBD we don't create the image, but let qemu-img do that for us.

            We then create a KVMPhysicalDisk object that we can return
         */
    KVMStoragePool srcPool = template.getPool();
    KVMPhysicalDisk disk = null;
    String newUuid = name;
    format = PhysicalDiskFormat.RAW;
    disk = new KVMPhysicalDisk(destPool.getSourceDir() + "/" + newUuid, newUuid, destPool);
    disk.setFormat(format);
    if (size > template.getVirtualSize()) {
        disk.setSize(size);
        disk.setVirtualSize(size);
    } else {
        // leave these as they were if size isn't applicable
        disk.setSize(template.getVirtualSize());
        disk.setVirtualSize(disk.getSize());
    }
    QemuImg qemu = new QemuImg(timeout);
    QemuImgFile srcFile;
    QemuImgFile destFile = new QemuImgFile(KVMPhysicalDisk.RBDStringBuilder(destPool.getSourceHost(), destPool.getSourcePort(), destPool.getAuthUserName(), destPool.getAuthSecret(), disk.getPath()));
    destFile.setFormat(format);
    if (srcPool.getType() != StoragePoolType.RBD) {
        srcFile = new QemuImgFile(template.getPath(), template.getFormat());
        try {
            qemu.convert(srcFile, destFile);
        } catch (QemuImgException e) {
            s_logger.error("Failed to create " + disk.getPath() + " due to a failed executing of qemu-img: " + e.getMessage());
        }
    } else {
        try {
            if ((srcPool.getSourceHost().equals(destPool.getSourceHost())) && (srcPool.getSourceDir().equals(destPool.getSourceDir()))) {
                /* We are on the same Ceph cluster, but we require RBD format 2 on the source image */
                s_logger.debug("Trying to perform a RBD clone (layering) since we are operating in the same storage pool");
                Rados r = new Rados(srcPool.getAuthUserName());
                r.confSet("mon_host", srcPool.getSourceHost() + ":" + srcPool.getSourcePort());
                r.confSet("key", srcPool.getAuthSecret());
                r.confSet("client_mount_timeout", "30");
                r.connect();
                s_logger.debug("Succesfully connected to Ceph cluster at " + r.confGet("mon_host"));
                IoCTX io = r.ioCtxCreate(srcPool.getSourceDir());
                Rbd rbd = new Rbd(io);
                RbdImage srcImage = rbd.open(template.getName());
                if (srcImage.isOldFormat()) {
                    /* The source image is RBD format 1, we have to do a regular copy */
                    s_logger.debug("The source image " + srcPool.getSourceDir() + "/" + template.getName() + " is RBD format 1. We have to perform a regular copy (" + disk.getVirtualSize() + " bytes)");
                    rbd.create(disk.getName(), disk.getVirtualSize(), rbdFeatures, rbdOrder);
                    RbdImage destImage = rbd.open(disk.getName());
                    s_logger.debug("Starting to copy " + srcImage.getName() + " to " + destImage.getName() + " in Ceph pool " + srcPool.getSourceDir());
                    rbd.copy(srcImage, destImage);
                    s_logger.debug("Finished copying " + srcImage.getName() + " to " + destImage.getName() + " in Ceph pool " + srcPool.getSourceDir());
                    rbd.close(destImage);
                } else {
                    s_logger.debug("The source image " + srcPool.getSourceDir() + "/" + template.getName() + " is RBD format 2. We will perform a RBD clone using snapshot " + rbdTemplateSnapName);
                    /* The source image is format 2, we can do a RBD snapshot+clone (layering) */
                    s_logger.debug("Checking if RBD snapshot " + srcPool.getSourceDir() + "/" + template.getName() + "@" + rbdTemplateSnapName + " exists prior to attempting a clone operation.");
                    List<RbdSnapInfo> snaps = srcImage.snapList();
                    s_logger.debug("Found " + snaps.size() + " snapshots on RBD image " + srcPool.getSourceDir() + "/" + template.getName());
                    boolean snapFound = false;
                    for (RbdSnapInfo snap : snaps) {
                        if (rbdTemplateSnapName.equals(snap.name)) {
                            s_logger.debug("RBD snapshot " + srcPool.getSourceDir() + "/" + template.getName() + "@" + rbdTemplateSnapName + " already exists.");
                            snapFound = true;
                            break;
                        }
                    }
                    if (!snapFound) {
                        s_logger.debug("Creating RBD snapshot " + rbdTemplateSnapName + " on image " + name);
                        srcImage.snapCreate(rbdTemplateSnapName);
                        s_logger.debug("Protecting RBD snapshot " + rbdTemplateSnapName + " on image " + name);
                        srcImage.snapProtect(rbdTemplateSnapName);
                    }
                    rbd.clone(template.getName(), rbdTemplateSnapName, io, disk.getName(), rbdFeatures, rbdOrder);
                    s_logger.debug("Succesfully cloned " + template.getName() + "@" + rbdTemplateSnapName + " to " + disk.getName());
                    /* We also need to resize the image if the VM was deployed with a larger root disk size */
                    if (disk.getVirtualSize() > template.getVirtualSize()) {
                        RbdImage diskImage = rbd.open(disk.getName());
                        diskImage.resize(disk.getVirtualSize());
                        rbd.close(diskImage);
                        s_logger.debug("Resized " + disk.getName() + " to " + disk.getVirtualSize());
                    }
                }
                rbd.close(srcImage);
                r.ioCtxDestroy(io);
            } else {
                /* The source pool or host is not the same Ceph cluster, we do a simple copy with Qemu-Img */
                s_logger.debug("Both the source and destination are RBD, but not the same Ceph cluster. Performing a copy");
                Rados rSrc = new Rados(srcPool.getAuthUserName());
                rSrc.confSet("mon_host", srcPool.getSourceHost() + ":" + srcPool.getSourcePort());
                rSrc.confSet("key", srcPool.getAuthSecret());
                rSrc.confSet("client_mount_timeout", "30");
                rSrc.connect();
                s_logger.debug("Succesfully connected to source Ceph cluster at " + rSrc.confGet("mon_host"));
                Rados rDest = new Rados(destPool.getAuthUserName());
                rDest.confSet("mon_host", destPool.getSourceHost() + ":" + destPool.getSourcePort());
                rDest.confSet("key", destPool.getAuthSecret());
                rDest.confSet("client_mount_timeout", "30");
                rDest.connect();
                s_logger.debug("Succesfully connected to source Ceph cluster at " + rDest.confGet("mon_host"));
                IoCTX sIO = rSrc.ioCtxCreate(srcPool.getSourceDir());
                Rbd sRbd = new Rbd(sIO);
                IoCTX dIO = rDest.ioCtxCreate(destPool.getSourceDir());
                Rbd dRbd = new Rbd(dIO);
                s_logger.debug("Creating " + disk.getName() + " on the destination cluster " + rDest.confGet("mon_host") + " in pool " + destPool.getSourceDir());
                dRbd.create(disk.getName(), disk.getVirtualSize(), rbdFeatures, rbdOrder);
                RbdImage srcImage = sRbd.open(template.getName());
                RbdImage destImage = dRbd.open(disk.getName());
                s_logger.debug("Copying " + template.getName() + " from Ceph cluster " + rSrc.confGet("mon_host") + " to " + disk.getName() + " on cluster " + rDest.confGet("mon_host"));
                sRbd.copy(srcImage, destImage);
                sRbd.close(srcImage);
                dRbd.close(destImage);
                rSrc.ioCtxDestroy(sIO);
                rDest.ioCtxDestroy(dIO);
            }
        } catch (RadosException e) {
            s_logger.error("Failed to perform a RADOS action on the Ceph cluster, the error was: " + e.getMessage());
            disk = null;
        } catch (RbdException e) {
            s_logger.error("Failed to perform a RBD action on the Ceph cluster, the error was: " + e.getMessage());
            disk = null;
        }
    }
    return disk;
}
Also used : Rados(com.ceph.rados.Rados) RadosException(com.ceph.rados.exceptions.RadosException) QemuImg(org.apache.cloudstack.utils.qemu.QemuImg) RbdSnapInfo(com.ceph.rbd.jna.RbdSnapInfo) QemuImgFile(org.apache.cloudstack.utils.qemu.QemuImgFile) Rbd(com.ceph.rbd.Rbd) QemuImgException(org.apache.cloudstack.utils.qemu.QemuImgException) RbdImage(com.ceph.rbd.RbdImage) IoCTX(com.ceph.rados.IoCTX) RbdException(com.ceph.rbd.RbdException)

Example 5 with RadosException

use of com.ceph.rados.exceptions.RadosException in project cloudstack by apache.

the class KVMStorageProcessor method deleteSnapshot.

@Override
public Answer deleteSnapshot(final DeleteCommand cmd) {
    String snap_full_name = "";
    try {
        SnapshotObjectTO snapshotTO = (SnapshotObjectTO) cmd.getData();
        PrimaryDataStoreTO primaryStore = (PrimaryDataStoreTO) snapshotTO.getDataStore();
        VolumeObjectTO volume = snapshotTO.getVolume();
        KVMStoragePool primaryPool = storagePoolMgr.getStoragePool(primaryStore.getPoolType(), primaryStore.getUuid());
        KVMPhysicalDisk disk = storagePoolMgr.getPhysicalDisk(primaryStore.getPoolType(), primaryStore.getUuid(), volume.getPath());
        String snapshotFullPath = snapshotTO.getPath();
        String snapshotName = snapshotFullPath.substring(snapshotFullPath.lastIndexOf("/") + 1);
        snap_full_name = disk.getName() + "@" + snapshotName;
        if (primaryPool.getType() == StoragePoolType.RBD) {
            Rados r = new Rados(primaryPool.getAuthUserName());
            r.confSet("mon_host", primaryPool.getSourceHost() + ":" + primaryPool.getSourcePort());
            r.confSet("key", primaryPool.getAuthSecret());
            r.confSet("client_mount_timeout", "30");
            r.connect();
            s_logger.debug("Succesfully connected to Ceph cluster at " + r.confGet("mon_host"));
            IoCTX io = r.ioCtxCreate(primaryPool.getSourceDir());
            Rbd rbd = new Rbd(io);
            RbdImage image = rbd.open(disk.getName());
            try {
                s_logger.info("Attempting to remove RBD snapshot " + snap_full_name);
                if (image.snapIsProtected(snapshotName)) {
                    s_logger.debug("Unprotecting RBD snapshot " + snap_full_name);
                    image.snapUnprotect(snapshotName);
                }
                image.snapRemove(snapshotName);
                s_logger.info("Snapshot " + snap_full_name + " successfully removed from " + primaryPool.getType().toString() + "  pool.");
            } catch (RbdException e) {
                s_logger.error("Failed to remove snapshot " + snap_full_name + ", with exception: " + e.toString() + ", RBD error: " + ErrorCode.getErrorMessage(e.getReturnValue()));
            } finally {
                rbd.close(image);
                r.ioCtxDestroy(io);
            }
        } else {
            s_logger.warn("Operation not implemented for storage pool type of " + primaryPool.getType().toString());
            throw new InternalErrorException("Operation not implemented for storage pool type of " + primaryPool.getType().toString());
        }
        return new Answer(cmd, true, "Snapshot " + snap_full_name + " removed successfully.");
    } catch (RadosException e) {
        s_logger.error("Failed to remove snapshot " + snap_full_name + ", with exception: " + e.toString() + ", RBD error: " + ErrorCode.getErrorMessage(e.getReturnValue()));
        return new Answer(cmd, false, "Failed to remove snapshot " + snap_full_name);
    } catch (RbdException e) {
        s_logger.error("Failed to remove snapshot " + snap_full_name + ", with exception: " + e.toString() + ", RBD error: " + ErrorCode.getErrorMessage(e.getReturnValue()));
        return new Answer(cmd, false, "Failed to remove snapshot " + snap_full_name);
    } catch (Exception e) {
        s_logger.error("Failed to remove snapshot " + snap_full_name + ", with exception: " + e.toString());
        return new Answer(cmd, false, "Failed to remove snapshot " + snap_full_name);
    }
}
Also used : SnapshotObjectTO(org.apache.cloudstack.storage.to.SnapshotObjectTO) Rados(com.ceph.rados.Rados) InternalErrorException(com.cloud.exception.InternalErrorException) RadosException(com.ceph.rados.exceptions.RadosException) URISyntaxException(java.net.URISyntaxException) LibvirtException(org.libvirt.LibvirtException) RbdException(com.ceph.rbd.RbdException) QemuImgException(org.apache.cloudstack.utils.qemu.QemuImgException) FileNotFoundException(java.io.FileNotFoundException) InternalErrorException(com.cloud.exception.InternalErrorException) ConfigurationException(javax.naming.ConfigurationException) CloudRuntimeException(com.cloud.utils.exception.CloudRuntimeException) RadosException(com.ceph.rados.exceptions.RadosException) IOException(java.io.IOException) CreateObjectAnswer(org.apache.cloudstack.storage.command.CreateObjectAnswer) ResignatureAnswer(org.apache.cloudstack.storage.command.ResignatureAnswer) Answer(com.cloud.agent.api.Answer) PrimaryStorageDownloadAnswer(com.cloud.agent.api.storage.PrimaryStorageDownloadAnswer) DettachAnswer(org.apache.cloudstack.storage.command.DettachAnswer) SnapshotAndCopyAnswer(org.apache.cloudstack.storage.command.SnapshotAndCopyAnswer) CopyCmdAnswer(org.apache.cloudstack.storage.command.CopyCmdAnswer) AttachAnswer(org.apache.cloudstack.storage.command.AttachAnswer) PrimaryDataStoreTO(org.apache.cloudstack.storage.to.PrimaryDataStoreTO) Rbd(com.ceph.rbd.Rbd) RbdImage(com.ceph.rbd.RbdImage) VolumeObjectTO(org.apache.cloudstack.storage.to.VolumeObjectTO) IoCTX(com.ceph.rados.IoCTX) RbdException(com.ceph.rbd.RbdException)

Aggregations

RadosException (com.ceph.rados.exceptions.RadosException)8 Rados (com.ceph.rados.Rados)7 IoCTX (com.ceph.rados.IoCTX)6 Rbd (com.ceph.rbd.Rbd)6 RbdException (com.ceph.rbd.RbdException)6 RbdImage (com.ceph.rbd.RbdImage)5 CloudRuntimeException (com.cloud.utils.exception.CloudRuntimeException)5 QemuImgException (org.apache.cloudstack.utils.qemu.QemuImgException)3 LibvirtException (org.libvirt.LibvirtException)3 RbdSnapInfo (com.ceph.rbd.jna.RbdSnapInfo)2 File (java.io.File)2 IOException (java.io.IOException)2 QemuImg (org.apache.cloudstack.utils.qemu.QemuImg)2 QemuImgFile (org.apache.cloudstack.utils.qemu.QemuImgFile)2 ReadOp (com.ceph.rados.ReadOp)1 ReadResult (com.ceph.rados.ReadOp.ReadResult)1 RadosObjectInfo (com.ceph.rados.jna.RadosObjectInfo)1 RbdImageInfo (com.ceph.rbd.jna.RbdImageInfo)1 Answer (com.cloud.agent.api.Answer)1 BackupSnapshotAnswer (com.cloud.agent.api.BackupSnapshotAnswer)1