You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2021/08/06 10:56:09 UTC

[GitHub] [cloudstack] GutoVeronezi commented on a change in pull request #5282: Fix regression on create volume from snapshot

GutoVeronezi commented on a change in pull request #5282:
URL: https://github.com/apache/cloudstack/pull/5282#discussion_r684144783



##########
File path: server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java
##########
@@ -898,7 +898,9 @@ public VolumeVO createVolume(CreateVolumeCmd cmd) {
             created = false;
             VolumeInfo vol = volFactory.getVolume(cmd.getEntityId());
             vol.stateTransit(Volume.Event.DestroyRequested);
-            throw new CloudRuntimeException("Failed to create volume: " + volume.getId(), e);
+            String message = String.format("Failed to create volume [%s] due to [%s].", volume.getId(), e.getMessage());
+            s_logger.error(message, e);
+            throw new CloudRuntimeException(message, e);

Review comment:
       @DaanHoogland as the real problem was not being logged, I thought it would be better to log it and keep the previous behavior. 
   
   What's your suggestion?




-- 
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: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org