public Collection<String> getRequiredHostGroups() {
    Collection<String> requiredHostGroups = new HashSet<>();
    requiredHostGroups.addAll(configurationProcessor.getRequiredHostGroups());
    if (configureSecurity) {
      requiredHostGroups.addAll(getRequiredHostgroupsForKerberosConfiguration());
    }
    return requiredHostGroups;
  }
Remove config-types, if there is no any services related to them (except cluster-env and global).
ambari-server/src/main/java/org/apache/ambari/server/topology/ClusterConfigurationRequest.java