Authored by qinchao

保留127.0.0.1在cmdb

@@ -360,7 +360,10 @@ public class HostInfoServiceImpl implements IHostInfoService { @@ -360,7 +360,10 @@ public class HostInfoServiceImpl implements IHostInfoService {
360 360
361 for(String ip : dbHosts){ 361 for(String ip : dbHosts){
362 if( !cloudHosts.contains(ip)){ 362 if( !cloudHosts.contains(ip)){
363 - oldIpList.add(ip); 363 + //保留127.0.0.1的ip,用作standalone类型的redis tw
  364 + if(!"127.0.0.1".equals(ip)){
  365 + oldIpList.add(ip);
  366 + }
364 } 367 }
365 } 368 }
366 369
@@ -39,7 +39,8 @@ public class UpdateHostTimeTask { @@ -39,7 +39,8 @@ public class UpdateHostTimeTask {
39 List<String> mobjectHostIps = mObjectInfoMapper.selectAllMobjectIps(); 39 List<String> mobjectHostIps = mObjectInfoMapper.selectAllMobjectIps();
40 List<String> deleteHostIpList = new ArrayList<>(); 40 List<String> deleteHostIpList = new ArrayList<>();
41 for( String ip : mobjectHostIps){ 41 for( String ip : mobjectHostIps){
42 - if( !allHostIps.contains(ip) ){ 42 + //保留127.0.0.1 用作stand alone redis的tw
  43 + if( !allHostIps.contains(ip) && !"127.0.0.1".equals(ip)){
43 deleteHostIpList.add(ip); 44 deleteHostIpList.add(ip);
44 } 45 }
45 } 46 }