protected void createOCFS2Sr(StorageFilerTO pool) throws XmlRpcException { OvmStoragePool.Details d = new OvmStoragePool.Details(); d.path = pool.getPath(); d.type = OvmStoragePool.OCFS2; d.uuid = pool.getUuid(); OvmStoragePool.create(_conn, d); s_logger.debug(String.format("Created SR (mount point:%1$s)", d.path)); }
protected void createNfsSr(StorageFilerTO pool) throws XmlRpcException { String mountPoint = String.format("%1$s:%2$s", pool.getHost(), pool.getPath()); OvmStoragePool.Details d = new OvmStoragePool.Details(); d.path = mountPoint; d.type = OvmStoragePool.NFS; d.uuid = pool.getUuid(); OvmStoragePool.create(_conn, d); s_logger.debug(String.format("Created SR (mount point:%1$s)", mountPoint)); }
citrixResourceBase.getNfsSR(conn, Long.toString(pool.getId()), pool.getUuid(), pool.getHost(), pool.getPath(), pool.toString()); } else if (pool.getType() == StoragePoolType.IscsiLUN) { citrixResourceBase.getIscsiSR(conn, pool.getUuid(), pool.getHost(), pool.getPath(), null, null, false); } else if (pool.getType() == StoragePoolType.PreSetup) { } else { } catch (final Exception e) { final String msg = "Catch Exception " + e.getClass().getName() + ", create StoragePool failed due to " + e.toString() + " on host:" + citrixResourceBase.getHost().getUuid() + " pool: " + pool.getHost() + pool.getPath();
public ModifyStoragePoolAnswer(ModifyStoragePoolCommand cmd, long capacityBytes, long availableBytes, Map<String, TemplateProp> tInfo) { super(cmd); result = true; poolInfo = new StoragePoolInfo(null, cmd.getPool().getHost(), cmd.getPool().getPath(), cmd.getLocalPath(), cmd.getPool().getType(), capacityBytes, availableBytes); templateInfo = tInfo; }
+ ", create StoragePool failed due to " + e.toString() + " on host:" + config.getAgentHostname() + " pool: " + pool.getHost() + pool.getPath(); LOGGER.warn(msg, e); return new Answer(cmd, false, msg);
String dst = primaryStorage.getPath() + "/" + primaryStorage.getUuid() + "/" + fileName; try { VolumeTO volume = new VolumeTO(cmd.getVolumeId(), disk.getType(), primaryStorage.getType(), primaryStorage.getUuid(), primaryStorage.getPath(), fileName, fp.getName(), fp.getSize(), null); return new CreateAnswer(cmd, volume);
} catch (final Exception e) { final String msg = "DeleteStoragePoolCommand XenAPIException:" + e.getMessage() + " host:" + citrixResourceBase.getHost().getUuid() + " pool: " + poolTO.getHost() + poolTO.getPath();
final long available = capacity - sr.getPhysicalUtilisation(conn); if (capacity == -1) { final String msg = "Pool capacity is -1! pool: " + pool.getHost() + pool.getPath(); s_logger.warn(msg); return new Answer(command, false, msg); } catch (final XenAPIException e) { final String msg = "ModifyStoragePoolCommand add XenAPIException:" + e.toString() + " host:" + citrixResourceBase.getHost().getUuid() + " pool: " + pool.getHost() + pool.getPath(); s_logger.warn(msg, e); return new Answer(command, false, msg); } catch (final Exception e) { final String msg = "ModifyStoragePoolCommand add XenAPIException:" + e.getMessage() + " host:" + citrixResourceBase.getHost().getUuid() + " pool: " + pool.getHost() + pool.getPath(); s_logger.warn(msg, e); return new Answer(command, false, msg); } catch (final XenAPIException e) { final String msg = "ModifyStoragePoolCommand remove XenAPIException:" + e.toString() + " host:" + citrixResourceBase.getHost().getUuid() + " pool: " + pool.getHost() + pool.getPath(); s_logger.warn(msg, e); return new Answer(command, false, msg); } catch (final Exception e) { final String msg = "ModifyStoragePoolCommand remove XenAPIException:" + e.getMessage() + " host:" + citrixResourceBase.getHost().getUuid() + " pool: " + pool.getHost() + pool.getPath(); s_logger.warn(msg, e); return new Answer(command, false, msg);
String mntUuid = pool.getUuid(); String nfsHost = pool.getHost(); String nfsPath = pool.getPath(); StorageDetails ss = store.storagePluginGetFileSystemInfo( propUuid, mntUuid, nfsHost, nfsPath);
protected CreateAnswer execute(CreateCommand cmd) { StorageFilerTO primaryStorage = cmd.getPool(); DiskProfile disk = cmd.getDiskCharacteristics(); try { OvmVolume.Details vol = null; if (cmd.getTemplateUrl() != null) { vol = OvmVolume.createFromTemplate(_conn, primaryStorage.getUuid(), cmd.getTemplateUrl()); } else { vol = OvmVolume.createDataDsik(_conn, primaryStorage.getUuid(), Long.toString(disk.getSize()), disk.getType() == Volume.Type.ROOT); } VolumeTO volume = new VolumeTO(cmd.getVolumeId(), disk.getType(), primaryStorage.getType(), primaryStorage.getUuid(), primaryStorage.getPath(), vol.name, vol.path, vol.size, null); return new CreateAnswer(cmd, volume); } catch (Exception e) { s_logger.debug("CreateCommand failed", e); return new CreateAnswer(cmd, e.getMessage()); } }
@Override public Answer execute(final ModifyStoragePoolCommand command, final LibvirtComputingResource libvirtComputingResource) { final KVMStoragePoolManager storagePoolMgr = libvirtComputingResource.getStoragePoolMgr(); final KVMStoragePool storagepool = storagePoolMgr.createStoragePool(command.getPool().getUuid(), command.getPool().getHost(), command.getPool().getPort(), command.getPool().getPath(), command.getPool() .getUserInfo(), command.getPool().getType()); if (storagepool == null) { return new Answer(command, false, " Failed to create storage pool"); } final Map<String, TemplateProp> tInfo = new HashMap<String, TemplateProp>(); final ModifyStoragePoolAnswer answer = new ModifyStoragePoolAnswer(command, storagepool.getCapacity(), storagepool.getAvailable(), tInfo); return answer; } }
new VolumeTO(command.getVolumeId(), dskch.getType(), pool.getType(), pool.getUuid(), vdir.nameLabel, pool.getPath(), vdir.uuid, vdir.virtualSize, null);
if (e.getMessage().contains("not found")) { primary = storagePoolMgr.createStoragePool(command.getPool().getUuid(), command.getPool().getHost(), command.getPool().getPort(), command.getPool().getPath(), command.getPool().getUserInfo(), command.getPool().getType()); } else {
final VolumeTO volume = new VolumeTO(command.getVolumeId(), dskch.getType(), pool.getType(), pool.getUuid(), pool.getPath(), vol.getName(), vol.getName(), disksize, null);
} catch (final CloudRuntimeException e) { if (e.getMessage().contains("not found")) { primaryPool = storagePoolMgr.createStoragePool(pool.getUuid(), pool.getHost(), pool.getPort(), pool.getPath(), pool.getUserInfo(), pool.getType()); } else {