DaanHoogland commented on code in PR #6408:
URL: https://github.com/apache/cloudstack/pull/6408#discussion_r890857697


##########
engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/VolumeOrchestrator.java:
##########
@@ -1061,16 +1096,16 @@ public VolumeVO doInTransaction(TransactionStatus 
status) {
                 try {
                     stateTransitTo(existingVolume, 
Volume.Event.DestroyRequested);
                 } catch (NoTransitionException e) {
-                    s_logger.debug("Unable to destroy existing volume: " + 
e.toString());
+                    s_logger.error(String.format("Unable to destroy existing 
volume [%s] due to [%s].", volumeToString, e.getMessage()));
                 }
                 // In case of VMware VM will continue to use the old root disk 
until expunged, so force expunge old root disk
                 if (vm.getHypervisorType() == HypervisorType.VMware) {
-                    s_logger.info("Expunging volume " + existingVolume.getId() 
+ " from primary data store");
+                    s_logger.info(String.format("Trying to expunge volume [%s] 
from primary data storage.", volumeToString));
                     AsyncCallFuture<VolumeApiResult> future = 
volService.expungeVolumeAsync(volFactory.getVolume(existingVolume.getId()));
                     try {
                         future.get();
                     } catch (Exception e) {
-                        s_logger.debug("Failed to expunge volume:" + 
existingVolume.getId(), e);
+                        s_logger.error(String.format("Failed to expunge volume 
[%s] from primary data storage due to [%s].", volumeToString, e.getMessage()), 
e);

Review Comment:
   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]

Reply via email to