sureshanaparti commented on a change in pull request #4934:
URL: https://github.com/apache/cloudstack/pull/4934#discussion_r615808456



##########
File path: 
engine/storage/datamotion/src/main/java/org/apache/cloudstack/storage/motion/DataMotionServiceImpl.java
##########
@@ -110,6 +111,7 @@ public void copyAsync(Map<VolumeInfo, DataStore> volumeMap, 
VirtualMachineTO vmT
             List<String> volumeIds = new LinkedList<String>();
             for (final VolumeInfo volumeInfo : volumeMap.keySet()) {
                 volumeIds.add(volumeInfo.getUuid());
+                volumeInfo.processEvent(Event.OperationFailed);

Review comment:
       @slavkap It is better to handle these state changes in the callback 
method defined for migrate vm with volume(s). This case is already handled in 
the callback here: 
https://github.com/apache/cloudstack/blob/671d2044c9b6188f5ea2f6e24ea7e8cae596cf63/engine/storage/volume/src/main/java/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java#L1662
   
   Log the error message and Call the callback method instead of throwing error 
here, outside for loop. The same is applicable to the other _copyAsync()_ 
method defined above in this class.




-- 
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to