mirror of https://github.com/apache/cloudstack.git
bug CS-15978: Fix for a corner case during fullsync where it tolerates a VM to exist on two clusters by virtue of it’s current host id and last host id (being on two diff clusters).
reviewed-by: Murali
This commit is contained in:
parent
e1ca140fe6
commit
70ec6089ac
|
|
@ -113,6 +113,7 @@ public class VMInstanceDaoImpl extends GenericDaoBase<VMInstanceVO, Long> implem
|
|||
LHVMClusterSearch = createSearchBuilder();
|
||||
SearchBuilder<HostVO> hostSearch1 = _hostDao.createSearchBuilder();
|
||||
LHVMClusterSearch.join("hostSearch1", hostSearch1, hostSearch1.entity().getId(), LHVMClusterSearch.entity().getLastHostId(), JoinType.INNER);
|
||||
LHVMClusterSearch.and("hostid", LHVMClusterSearch.entity().getHostId(), Op.NULL);
|
||||
hostSearch1.and("clusterId", hostSearch1.entity().getClusterId(), SearchCriteria.Op.EQ);
|
||||
LHVMClusterSearch.done();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue