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


##########
engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/VolumeOrchestrator.java:
##########
@@ -1250,18 +1293,18 @@ public Volume liveMigrateVolume(Volume volume, 
StoragePool destPool) {
         VolumeInfo vol = volFactory.getVolume(volume.getId());
         DataStore dataStoreTarget = 
dataStoreMgr.getDataStore(destPool.getId(), DataStoreRole.Primary);
         AsyncCallFuture<VolumeApiResult> future = 
volService.migrateVolume(vol, dataStoreTarget);
+
+        String volToString = getReflectOnlySelectedFields(vol.getVolume());
+
         try {
             VolumeApiResult result = future.get();
             if (result.isFailed()) {
-                s_logger.debug("migrate volume failed:" + result.getResult());
+                s_logger.error(String.format("Volume [%s] migration failed due 
to [%s].", volToString, result.getResult()));
                 return null;
             }
             return result.getVolume();
-        } catch (InterruptedException e) {
-            s_logger.debug("migrate volume failed", e);
-            return null;
-        } catch (ExecutionException e) {
-            s_logger.debug("migrate volume failed", e);
+        } catch (InterruptedException | ExecutionException e) {
+            s_logger.error(String.format("Volume [%s] migration failed due to 
[%s].", volToString, 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