mirror of https://github.com/apache/cloudstack.git
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).
This commit is contained in:
parent
e6ef6985f8
commit
6f26894eaf
|
|
@ -117,6 +117,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