slavkap commented on a change in pull request #4388:
URL: https://github.com/apache/cloudstack/pull/4388#discussion_r502266925
##########
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:
yes, I will add to check if it's OVA
----------------------------------------------------------------
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]