DaanHoogland commented on code in PR #6408:
URL: https://github.com/apache/cloudstack/pull/6408#discussion_r884105282
##########
engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/VolumeOrchestrator.java:
##########
@@ -638,46 +655,57 @@ public VolumeInfo createVolume(VolumeInfo volume,
VirtualMachine vm, VirtualMach
pool = findStoragePool(dskCh, dc, pod, clusterId, vm.getHostId(), vm,
avoidPools);
if (pool == null) {
- s_logger.warn("Unable to find suitable primary storage when
creating volume " + volume.getName());
- throw new CloudRuntimeException("Unable to find suitable primary
storage when creating volume " + volume.getName());
+ String msg = String.format("Unable to find suitable primary
storage when creating volume [%s].", volumeToString);
+ s_logger.error(msg);
+ throw new CloudRuntimeException(msg);
}
+ String poolToString = getReflectOnlySelectedFields(pool);
+
if (s_logger.isDebugEnabled()) {
- s_logger.debug("Trying to create " + volume + " on " + pool);
+ s_logger.debug(String.format("Trying to create volume [%s] on
storage pool [%s].",
+ volumeToString, poolToString));
}
DataStore store = dataStoreMgr.getDataStore(pool.getId(),
DataStoreRole.Primary);
for (int i = 0; i < 2; i++) {
// retry one more time in case of template reload is required for
Vmware case
AsyncCallFuture<VolumeApiResult> future = null;
- boolean isNotCreatedFromTemplate = volume.getTemplateId() == null
? true : false;
+ boolean isNotCreatedFromTemplate = volumeInfo.getTemplateId() ==
null ? true : false;
Review Comment:
not due to your code @paulazomig , but an easy improvement.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]