Skip to content

Commit b1fa765

Browse files
committed
remove TODO and comments
1 parent adf3d92 commit b1fa765

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/storage/LinstorStorageAdaptor.java

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -260,15 +260,13 @@ public boolean connectPhysicalDisk(String volumePath, KVMStoragePool pool, Map<S
260260
public boolean disconnectPhysicalDisk(String volumePath, KVMStoragePool pool)
261261
{
262262
s_logger.debug("Linstor: disconnectPhysicalDisk " + pool.getUuid() + ":" + volumePath);
263-
// TODO remove diskless/diskful on node
264263
return true;
265264
}
266265

267266
@Override
268267
public boolean disconnectPhysicalDisk(Map<String, String> volumeToDisconnect)
269268
{
270269
s_logger.debug("Linstor: disconnectPhysicalDisk map");
271-
// TODO remove diskless/diskful on node
272270
return true;
273271
}
274272

@@ -290,7 +288,7 @@ private Optional<ResourceWithVolumes> getResourceByPath(final List<ResourceWithV
290288
public boolean disconnectPhysicalDiskByPath(String localPath)
291289
{
292290
s_logger.debug("Linstor: disconnectPhysicalDiskByPath " + localPath);
293-
// get first storage pool from the map, as we don't now any better:
291+
// get first storage pool from the map, as we don't know any better:
294292
if (!MapStorageUuidToStoragePool.isEmpty())
295293
{
296294
String firstKey = MapStorageUuidToStoragePool.keySet().stream().findFirst().get();
@@ -392,7 +390,6 @@ public KVMPhysicalDisk copyPhysicalDisk(KVMPhysicalDisk disk, String name, KVMSt
392390

393391
final QemuImgFile srcFile = new QemuImgFile(sourcePath, sourceFormat);
394392

395-
// create linstor resource
396393
final KVMPhysicalDisk dstDisk = destPools.createPhysicalDisk(
397394
name, QemuImg.PhysicalDiskFormat.RAW, Storage.ProvisioningType.FAT, disk.getVirtualSize());
398395

@@ -403,9 +400,7 @@ public KVMPhysicalDisk copyPhysicalDisk(KVMPhysicalDisk disk, String name, KVMSt
403400
try {
404401
qemu.convert(srcFile, destFile);
405402
} catch (QemuImgException | LibvirtException e) {
406-
s_logger.error("Failed to copy " + srcFile.getFileName() + " to " +
407-
destFile.getFileName() + " the error was: " + e.getMessage());
408-
// cleanup useless resource
403+
s_logger.error(e);
409404
destPools.deletePhysicalDisk(name, Storage.ImageFormat.RAW);
410405
throw new CloudRuntimeException("Failed to copy " + disk.getPath() + " to " + name);
411406
}

0 commit comments

Comments
 (0)