Examples of ioCtxDestroy()


Examples of com.ceph.rados.Rados.ioCtxDestroy()

                        s_logger.debug("Attempting to create RBD snapshot " + disk.getName() + "@" + snapshotName);
                        image.snapCreate(snapshotName);

                        rbd.close(image);
                        r.ioCtxDestroy(io);
                    } catch (Exception e) {
                        s_logger.error("A RBD snapshot operation on " + disk.getName() + " failed. The error was: " + e.getMessage());
                    }
                } else {
                    /* VM is not running, create a snapshot by ourself */
 
View Full Code Here

Examples of com.ceph.rados.Rados.ioCtxDestroy()

                IoCTX io = r.ioCtxCreate(pool.getSourceDir());
                Rbd rbd = new Rbd(io);
                rbd.create(name, size, rbdFeatures, rbdOrder);

                r.ioCtxDestroy(io);
            } catch (RadosException e) {
                throw new CloudRuntimeException(e.toString());
            } catch (RbdException e) {
                throw new CloudRuntimeException(e.toString());
            }
View Full Code Here

Examples of com.ceph.rados.Rados.ioCtxDestroy()

                    s_logger.debug("Removing snapshot " + pool.getSourceDir() + "/" + uuid + "@" + snap.name);
                    image.snapRemove(snap.name);
                }

                rbd.close(image);
                r.ioCtxDestroy(io);
            } catch (RadosException e) {
                throw new CloudRuntimeException(e.toString());
            } catch (RbdException e) {
                throw new CloudRuntimeException(e.toString());
            }
View Full Code Here

Examples of com.ceph.rados.Rados.ioCtxDestroy()

                                rbd.clone(template.getName(), rbdTemplateSnapName, io, disk.getName(), rbdFeatures, rbdOrder);
                                s_logger.debug("Succesfully cloned " + template.getName() + "@" + rbdTemplateSnapName + " to " + disk.getName());
                            }

                            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());
View Full Code Here

Examples of com.ceph.rados.Rados.ioCtxDestroy()

                            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) {
View Full Code Here

Examples of com.ceph.rados.Rados.ioCtxDestroy()

                image.snapCreate(rbdTemplateSnapName);
                s_logger.debug("Protecting RBD snapshot " + rbdTemplateSnapName + " on image " + name);
                image.snapProtect(rbdTemplateSnapName);

                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());
View Full Code Here

Examples of com.ceph.rados.Rados.ioCtxDestroy()

                IoCTX io = r.ioCtxCreate(pool.getSourceDir());
                Rbd rbd = new Rbd(io);
                rbd.create(name, size, this.rbdFeatures, this.rbdOrder);

                r.ioCtxDestroy(io);
            } catch (RadosException e) {
                throw new CloudRuntimeException(e.toString());
            } catch (RbdException e) {
                throw new CloudRuntimeException(e.toString());
            }
View Full Code Here

Examples of com.ceph.rados.Rados.ioCtxDestroy()

                    image.snapUnprotect(snap.name);
                    image.snapRemove(snap.name);
                }

                rbd.close(image);
                r.ioCtxDestroy(io);
            } catch (RadosException e) {
                throw new CloudRuntimeException(e.toString());
            } catch (RbdException e) {
                throw new CloudRuntimeException(e.toString());
            }
View Full Code Here

Examples of com.ceph.rados.Rados.ioCtxDestroy()

                                rbd.clone(template.getName(), this.rbdTemplateSnapName, io, disk.getName(), this.rbdFeatures, this.rbdOrder);
                                s_logger.debug("Succesfully cloned " + template.getName() + "@" + this.rbdTemplateSnapName + " to " + disk.getName());
                            }

                            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());
View Full Code Here

Examples of com.ceph.rados.Rados.ioCtxDestroy()

                            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) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.