public static TSStatus confirmConfigNodeRegistration(
      TConfigNodeRegisterReq req, ConfigManager configManager) {
    // Confirm cluster name
    TSStatus status =
        confirmClusterName(NodeType.ConfigNode, req.getClusterParameters().getClusterName());
    if (status.getCode() != TSStatusCode.SUCCESS_STATUS.getStatusCode()) {
      return status;
    }
    // Confirm end point conflicts
    List<TEndPoint> conflictEndPoints =
        checkConflictTEndPointForNewConfigNode(
            req.getConfigNodeLocation(), configManager.getNodeManager().getRegisteredConfigNodes());
    if (!conflictEndPoints.isEmpty()) {
      return rejectRegistrationBecauseConflictEndPoints(NodeType.ConfigNode, conflictEndPoints);
    }
    // Confirm whether cluster id has been generated
    status = confirmClusterId(configManager);
    if (status.getCode() != TSStatusCode.SUCCESS_STATUS.getStatusCode()) {
      return status;
    }
    // Success
    return ACCEPT_NODE_REGISTRATION;
  }
Startup check utils before register/restart a ConfigNode/DataNode.
iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/manager/node/ClusterNodeStartUtils.java