CLOUDSTACK-9842: Unable to map root volume usage to VM

removed code which nullifies  vm_instance_id
Also modified QueryManagerImpl to ignore volume which does not have uuid. This is to avoid duplicate volume listing.
This commit is contained in:
Sudhansu 2015-12-18 09:57:08 +05:30 committed by Sudhansu
parent 9cc3ae8a94
commit 3cced927c4
2 changed files with 1 additions and 1 deletions

View File

@ -647,7 +647,6 @@ public class VolumeDaoImpl extends GenericDaoBase<VolumeVO, Long> implements Vol
String uuid = srcVol.getUuid();
Long instanceId = srcVol.getInstanceId();
srcVol.setUuid(null);
srcVol.setInstanceId(null);
destVol.setUuid(uuid);
destVol.setInstanceId(instanceId);
update(srcVolId, srcVol);

View File

@ -1769,6 +1769,7 @@ public class QueryManagerImpl extends MutualExclusiveIdsManagerBase implements Q
sb.and("id", sb.entity().getId(), SearchCriteria.Op.EQ);
sb.and("idIN", sb.entity().getId(), SearchCriteria.Op.IN);
sb.and("volumeType", sb.entity().getVolumeType(), SearchCriteria.Op.LIKE);
sb.and("uuid", sb.entity().getUuid(), SearchCriteria.Op.NNULL);
sb.and("instanceId", sb.entity().getVmId(), SearchCriteria.Op.EQ);
sb.and("dataCenterId", sb.entity().getDataCenterId(), SearchCriteria.Op.EQ);
sb.and("podId", sb.entity().getPodId(), SearchCriteria.Op.EQ);