@Transactional
  void removeConfigGroupHostEntity(Host host) {
    ConfigGroupEntity configGroupEntity = getConfigGroupEntity();
    ConfigGroupHostMappingEntityPK hostMappingEntityPK = new ConfigGroupHostMappingEntityPK();
    hostMappingEntityPK.setHostId(host.getHostId());
    hostMappingEntityPK.setConfigGroupId(configGroupId);

    ConfigGroupHostMappingEntity configGroupHostMapping = configGroupHostMappingDAO.findByPK(
        hostMappingEntityPK);

    configGroupHostMappingDAO.remove(configGroupHostMapping);

    configGroupEntity.getConfigGroupHostMappingEntities().remove(configGroupHostMapping);
    configGroupEntity = configGroupDAO.merge(getConfigGroupEntity());
  }
Removes the {@link ConfigGroupHostMappingEntity} for the specified host
from this configuration group.

@param host
         the host to remove.
ambari-server/src/main/java/org/apache/ambari/server/state/configgroup/ConfigGroupImpl.java