mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-9992 : Failed to change cluster to managed state
This commit is contained in:
parent
fa2c5a0128
commit
d450e1acc0
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue