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



##########
File path: server/src/main/java/com/cloud/vm/UserVmManagerImpl.java
##########
@@ -1956,16 +1952,16 @@ private boolean upgradeRunningVirtualMachine(Long vmId, 
Long newServiceOfferingI
 
             if (answer instanceof GetVolumeStatsAnswer){
                 GetVolumeStatsAnswer volstats = (GetVolumeStatsAnswer)answer;
-                return volstats.getVolumeStats();
+                volumeStatsByUuid.putAll(volstats.getVolumeStats());
             }
         }
-        return null;
+        return volumeStatsByUuid.size() > 0 ? volumeStatsByUuid : null;
     }
 
     private List<String> getVolumesByHost(HostVO host, StoragePool pool){
-        List<UserVmVO> vmsPerHost = _vmDao.listByHostId(host.getId());
+        List<VMInstanceVO> vmsPerHost = 
_vmInstanceDao.listByHostId(host.getId());
         return vmsPerHost.stream()
-                .flatMap(vm -> 
_volsDao.findByInstanceIdAndPoolId(vm.getId(),pool.getId()).stream().map(vol -> 
vol.getPath()))
+                .flatMap(vm -> 
_volsDao.findByInstanceIdAndPoolId(vm.getId(),pool.getId()).stream().map(vol -> 
vol.getState() == Volume.State.Ready ? vol.getPath() : 
null).filter(Objects::nonNull))

Review comment:
       ok @slavkap  you have corrected the volume locator for QCOW2 in the 
response helper, this would be similar change for OVA 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.

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


Reply via email to