You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by sa...@apache.org on 2017/08/19 08:43:36 UTC
[cloudstack] branch master updated: CLOUDSTACK-9992 : Failed to
change cluster to managed state
This is an automated email from the ASF dual-hosted git repository.
sateesh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/master by this push:
new d450e1a CLOUDSTACK-9992 : Failed to change cluster to managed state
d450e1a is described below
commit d450e1acc0f39183e910c99abbbc8e3b98f9c2b0
Author: Nitesh Sarda <ni...@accelerite.com>
AuthorDate: Tue Jul 11 17:59:04 2017 +0530
CLOUDSTACK-9992 : Failed to change cluster to managed state
---
engine/schema/src/com/cloud/host/dao/HostDaoImpl.java | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/engine/schema/src/com/cloud/host/dao/HostDaoImpl.java b/engine/schema/src/com/cloud/host/dao/HostDaoImpl.java
index f12a628..309d17e 100644
--- a/engine/schema/src/com/cloud/host/dao/HostDaoImpl.java
+++ b/engine/schema/src/com/cloud/host/dao/HostDaoImpl.java
@@ -377,6 +377,11 @@ public class HostDaoImpl extends GenericDaoBase<HostVO, Long> implements HostDao
ClustersForHostsNotOwnedByAnyMSSearch.and("resource", ClustersForHostsNotOwnedByAnyMSSearch.entity().getResource(), SearchCriteria.Op.NNULL);
ClustersForHostsNotOwnedByAnyMSSearch.and("cluster", ClustersForHostsNotOwnedByAnyMSSearch.entity().getClusterId(), SearchCriteria.Op.NNULL);
ClustersForHostsNotOwnedByAnyMSSearch.and("server", ClustersForHostsNotOwnedByAnyMSSearch.entity().getManagementServerId(), SearchCriteria.Op.NULL);
+
+ ClusterManagedSearch = _clusterDao.createSearchBuilder();
+ ClusterManagedSearch.and("managed", ClusterManagedSearch.entity().getManagedState(), SearchCriteria.Op.EQ);
+ ClustersForHostsNotOwnedByAnyMSSearch.join("ClusterManagedSearch", ClusterManagedSearch, ClusterManagedSearch.entity().getId(), ClustersForHostsNotOwnedByAnyMSSearch.entity().getClusterId(), JoinType.INNER);
+
ClustersForHostsNotOwnedByAnyMSSearch.done();
AllClustersSearch = _clusterDao.createSearchBuilder(Long.class);
@@ -501,6 +506,7 @@ public class HostDaoImpl extends GenericDaoBase<HostVO, Long> implements HostDao
*/
private List<Long> findClustersForHostsNotOwnedByAnyManagementServer() {
SearchCriteria<Long> sc = ClustersForHostsNotOwnedByAnyMSSearch.create();
+ sc.setJoinParameters("ClusterManagedSearch", "managed", Managed.ManagedState.Managed);
List<Long> clusters = customSearch(sc, null);
return clusters;
--
To stop receiving notification emails like this one, please contact
['"commits@cloudstack.apache.org" <co...@cloudstack.apache.org>'].