GabrielBrascher commented on a change in pull request #5789:
URL: https://github.com/apache/cloudstack/pull/5789#discussion_r775944212



##########
File path: server/src/main/java/com/cloud/storage/StorageManagerImpl.java
##########
@@ -2136,6 +2136,7 @@ public Host 
findUpAndEnabledHostWithAccessToStoragePools(List<Long> poolIds) {
         if (hostIds.isEmpty()) {
             return null;
         }
+        Collections.shuffle(hostIds);

Review comment:
       I might be wrong on this one, but I think that there are not many logs 
regarding the chosen host to migrate.
   Call hierarchy that I've taken a quick check does not present logs. Assuming 
your comment, this would be logged later on in the call hierarchy ( I haven't 
checked all the way). Even if it is, you can see that many exceptions can be 
thrown not too late after the host ID is retrieved.
   ```
   > 
StorageManagerImpl.findUpAndEnabledHostWithAccessToStoragePools(List<Long>)  
(com.cloud.storage)
       > VolumeServiceImpl.copyManagedVolume(VolumeInfo, DataStore)  
(org.apache.cloudstack.storage.volume)
           > VolumeServiceImpl.copyVolume(VolumeInfo, DataStore)  
(org.apache.cloudstack.storage.volume)
               > VolumeOrchestrator.copyVolumeFromSecToPrimary(VolumeInfo, 
VirtualMachine, VirtualMachineTemplate, DataCenter, Pod, Long, ServiceOffering, 
...)  (org.apache.cloudstack.engine.orchestration)
               ...
               > VolumeOrchestrator.migrateVolume(Volume, StoragePool)  
(org.apache.cloudstack.engine.orchestration)
               ...
               > VolumeApiServiceImpl.orchestrateExtractVolume(long, long)  
(com.cloud.storage)
               ...
   ```
   
   Additionally, the `canHostAccessStoragePools` called inside the 
`findUpAndEnabledHostWithAccessToStoragePools` can return false. If the host 
cannot access, not much is logged as well.
   
   Please, let us know in case we are missing something here.




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