@@ -1086,7 +1086,7 @@ public Cluster updateCluster(final Cluster clusterToUpdate, final String cluster
10861086 try {
10871087 cluster .setManagedState (Managed .ManagedState .PrepareUnmanaged );
10881088 _clusterDao .update (cluster .getId (), cluster );
1089- List <HostVO > hosts = listAllUpAndEnabledHosts (Host .Type .Routing , cluster .getId (), cluster .getPodId (), cluster .getDataCenterId ());
1089+ List <HostVO > hosts = listAllHosts (Host .Type .Routing , cluster .getId (), cluster .getPodId (), cluster .getDataCenterId ());
10901090 for (final HostVO host : hosts ) {
10911091 if (host .getType ().equals (Host .Type .Routing ) && !host .getStatus ().equals (Status .Down ) && !host .getStatus ().equals (Status .Disconnected ) &&
10921092 !host .getStatus ().equals (Status .Up ) && !host .getStatus ().equals (Status .Alert )) {
@@ -2494,6 +2494,22 @@ public List<HostVO> listAllUpAndEnabledHosts(final Type type, final Long cluster
24942494 return sc .list ();
24952495 }
24962496
2497+ @ Override
2498+ public List <HostVO > listAllHosts (final Type type , final Long clusterId , final Long podId , final long dcId ) {
2499+ final QueryBuilder <HostVO > sc = QueryBuilder .create (HostVO .class );
2500+ if (type != null ) {
2501+ sc .and (sc .entity ().getType (), Op .EQ , type );
2502+ }
2503+ if (clusterId != null ) {
2504+ sc .and (sc .entity ().getClusterId (), Op .EQ , clusterId );
2505+ }
2506+ if (podId != null ) {
2507+ sc .and (sc .entity ().getPodId (), Op .EQ , podId );
2508+ }
2509+ sc .and (sc .entity ().getDataCenterId (), Op .EQ , dcId );
2510+ return sc .list ();
2511+ }
2512+
24972513 @ Override
24982514 public List <HostVO > listAllUpAndEnabledNonHAHosts (final Type type , final Long clusterId , final Long podId , final long dcId ) {
24992515 final String haTag = _haMgr .getHaTag ();
0 commit comments