DaanHoogland commented on code in PR #6408:
URL: https://github.com/apache/cloudstack/pull/6408#discussion_r890860072
##########
engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/VolumeOrchestrator.java:
##########
@@ -546,15 +553,18 @@ public VolumeInfo createVolumeFromSnapshot(Volume volume,
Snapshot snapshot, Use
// create volume on primary from snapshot
AsyncCallFuture<VolumeApiResult> future =
volService.createVolumeFromSnapshot(vol, store, snapInfo);
+ String snapshotToString =
getReflectOnlySelectedFields(snapInfo.getSnapshotVO());
+
try {
VolumeApiResult result = future.get();
if (result.isFailed()) {
- s_logger.debug("Failed to create volume from snapshot:" +
result.getResult());
- throw new CloudRuntimeException("Failed to create volume from
snapshot:" + result.getResult());
+ String logMsg = String.format("Failed to create volume from
snapshot [%s] due to [%s].", snapshotToString, result.getResult());
+ s_logger.error(logMsg);
+ throw new CloudRuntimeException(logMsg);
}
return result.getVolume();
} catch (InterruptedException | ExecutionException e) {
- String message = String.format("Failed to create volume from
snapshot [%s] due to [%s].", snapInfo.getTO(), e.getMessage());
+ String message = String.format("Failed to create volume from
snapshot [%s] due to [%s].", snapshotToString, e.getMessage());
s_logger.error(message, e);
Review Comment:
not your doing, but please don“t log error with exception. If need be add a
debug that logs the stacktrace
--
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]