From 70ec6089ac95f006265b083ef9b6d642d8dbbf7e Mon Sep 17 00:00:00 2001 From: Abhinandan Prateek Date: Wed, 22 Aug 2012 12:36:14 +0530 Subject: [PATCH] =?UTF-8?q?bug=20CS-15978:=20Fix=20for=20a=20corner=20case?= =?UTF-8?q?=20during=20fullsync=20where=20it=20tolerates=20a=20VM=20to=20e?= =?UTF-8?q?xist=20on=20two=20clusters=20by=20virtue=20of=20it=E2=80=99s=20?= =?UTF-8?q?current=20host=20id=20and=20last=20host=20id=20(being=20on=20tw?= =?UTF-8?q?o=20diff=20clusters).=20reviewed-by:=20Murali?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/src/com/cloud/vm/dao/VMInstanceDaoImpl.java | 1 + 1 file changed, 1 insertion(+) diff --git a/server/src/com/cloud/vm/dao/VMInstanceDaoImpl.java b/server/src/com/cloud/vm/dao/VMInstanceDaoImpl.java index b40d871e25d..502dad27108 100644 --- a/server/src/com/cloud/vm/dao/VMInstanceDaoImpl.java +++ b/server/src/com/cloud/vm/dao/VMInstanceDaoImpl.java @@ -113,6 +113,7 @@ public class VMInstanceDaoImpl extends GenericDaoBase implem LHVMClusterSearch = createSearchBuilder(); SearchBuilder 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();